38 lines
834 B
Plaintext
38 lines
834 B
Plaintext
type RelationshipsAdapter = class
|
|
public
|
|
function Create(_obj: Relationships);
|
|
function Init();
|
|
|
|
property Id read ReadId write WriteId;
|
|
function ReadId(_key: string);
|
|
function WriteId(_key: string; _value: tslobj);
|
|
|
|
private
|
|
object_: Relationships;
|
|
relationship_hash_: tableArray;
|
|
end;
|
|
|
|
function RelationshipsAdapter.Create(_obj: Relationships);
|
|
begin
|
|
object_ := _obj;
|
|
relationship_hash_ := array();
|
|
self.Init();
|
|
end;
|
|
|
|
function RelationshipsAdapter.Init();
|
|
begin
|
|
elements := object_.Relationships;
|
|
for k,v in elements do
|
|
relationship_hash_[v.Id] := v;
|
|
end;
|
|
|
|
function RelationshipsAdapter.ReadId(_key: string);
|
|
begin
|
|
return relationship_hash_[_key];
|
|
end;
|
|
|
|
function RelationshipsAdapter.WriteId(_key: string; _value: tslobj);
|
|
begin
|
|
relationship_hash_[_key] := _value;
|
|
end;
|