ユニット core.complex
複雑な値を作成および更新するためのメソッドを提供するスクリプトユニット。
| メソッド |
|---|
| foreignKeyOf<foreignKeyType>(): foreignKeyType 外部キータイプのインスタンスを作成します。 |
| formatPrimaryKey(primaryKey: primaryKeyType): string 主キーの内部 tableRef 文字列表現を返します。 |
| of<complexType>(): complexType 複合型のインスタンスを作成します。 |
| parsePrimaryKey<primaryKeyType>(value: string): primaryKeyType 文字列を主キーに解析します。 |
| primaryKeyOf<primaryKeyType>(): primaryKeyType 主キー型のインスタンスを作成します。 |
foreignKeyOf
foreignKeyOf<foreignKeyType>(): foreignKeyType
外部キータイプのインスタンスを作成します。
注意:外部キーフィールドには、参照先のテーブルの主キーが含まれます。
このメソッドは complex.primaryKeyOf メソッドと同等です。complex.primaryKeyOf メソッドを優先してください。
例
uses core.complex as complex;
export function getValue(): typeof _ebx.record.Supervisor
begin
var foreignKey := complex.foreignKeyOf<typeof _ebx.record.Supervisor>();
foreignKey.Id := 435;
return foreignKey;
end
関数の型
primaryKeyType: 主キーの型。外部キーの型または式 foreignKeyOf にすることができます。必須です。
戻り値
新しい外部キーオブジェクト。常に変更可能です。
使用可能な場所:
formatPrimaryKey
formatPrimaryKey(primaryKey: primaryKeyType): string
主キーの内部 tableRef 文字列表現を返します。
関数の型
string: 主キーの内部表現。
パラメータ:
primaryKey: 主キー
戻り値
文字列が解析可能な場合は新しい可変主キーオブジェクト、それ以外の場合は null。
使用可能な場所:
of
of<complexType>(): complexType
複合型のインスタンスを作成します。
例
uses core.complex as complex;
export function getValue(): typeof _ebx.record.OfficeAddress
begin
var value := complex.of<typeof _ebx.record.OfficeAddress>();
value.Street := '4323 Broadway';
value.City := 'New York';
value.State := 'NY';
value.Zip := '10019';
value.Country := 'USA';
return value;
end
関数の型
complexType: オブジェクト タイプ。必須です。識別子の式タイプにする必要があります。
戻り値
新しいオブジェクト。常に指定されたタイプの可変バージョンです。
使用可能な場所:
parsePrimaryKey
parsePrimaryKey<primaryKeyType>(value: string): primaryKeyType
文字列を主キーに解析します。
例
uses core.complex as complex;
export function getValue(): typeof _ebx.record.Supervisor
begin
var foreignKey := complex.parsePrimaryKey<typeof _ebx.record.Supervisor>('567');
return foreignKey;
end
関数の型
primaryKeyType: 主キーの型。外部キーの型または式 primaryKeyOf にすることができます。必須です。
パラメータ:
value: 解析する主キーの内部表現を含む文字列
戻り値
文字列が解析可能な場合は新しい可変主キーオブジェクト、それ以外の場合は null。
使用可能な場所:
primaryKeyOf
primaryKeyOf<primaryKeyType>(): primaryKeyType
主キー型のインスタンスを作成します。
注意:外部キーフィールドには、参照先のテーブルの主キーが含まれます。
例
uses core.complex as complex;
export function getValue(): typeof _ebx.record.Supervisor
begin
var foreignKey := complex.primaryKeyOf<typeof _ebx.record.Supervisor>();
foreignKey.Id := 435;
return foreignKey;
end
関数の型
primaryKeyType: 主キーの型。外部キーの型または式 primaryKeyOf にすることができます。必須です。
戻り値
新しい主キーオブジェクト。常に変更可能です。
使用可能な場所: