4D v18

dataClass.getInfo( )

ホーム

 
4D v18
dataClass.getInfo( )

dataClass.getInfo( )  


 

説明  

dataClass.getInfo( ) メソッドはデータクラスについての情報を提供するオブジェクトを返します。このメソッドは汎用的なコードを設定するのに有用です。

返されるオブジェクト

プロパティy詳細
name文字列データクラスの名前
primaryKey文字列データクラスのプライマリーキーの名前
tableNumber数値4D の内部的なテーブル番号

 C_OBJECT($1;$e;$status)
 $e:=$1 //$1 はエンティティ
 
 computeEmployeeNumber($e//エンティティに何らかの操作をする
 
 $status:=$e.save()
 if($status.success)
    ALERT("Record updated in table "+$e.getDataClass().getInfo().name)
 End if

 C_OBJECT($es;$settings)
 
 $settings:=New object
 $settings.parameters:=New object("receivedIds";getIds())
 $settings.attributes:=New object("pk";ds.Clients.getInfo().primaryKey)
 $es:=ds.Clients.query(":pk in :receivedIds";$settings)

 C_TEXT($pk)
 C_OBJECT($dataClassAttribute)
 
 $pk:=ds.Employee.getInfo().primaryKey
 $dataClassAttribute:=ds.Employee[$pk// 必要であればプライマリーキーに合致した属性へのアクセスは可能



参照 


dataStore.getInfo( )
entitySelection.getDataClass( )

 
プロパティ 

プロダクト: 4D
テーマ: ORDA - データクラス

This command can be run in preemptive processes

 
ページの目次 
 
履歴 

 
ARTICLE USAGE

ランゲージリファレンス ( 4D v18)