You are not logged in.
Pages: 1
Is it possible to implement Data Domain like this with the framework:
TSQLDomainCode = class/Record?
Type: RawUT8;
Size: 10;//max 10 character
Filter/Pattern/constrain: TSynFilterUpperCase;
DisplayWidth:100; //in pixel
..
..
end;
TSQLDomainNumber = class
Type: RawUT8;
Size: 4;//max 4 character
Filter/Pattern/constrain:'[0-9][0-9][0-9][0-9]';
DisplayWidth:50; //in pixel
..
..
end;
TSQLDomainNumber4 = class(TSQLDomainNumber);
TSQLDomainNumber3 = class(TSQLDomainNumber)
Size: 3;//max 3 character
Filter/Pattern/constrain:'[0-9][0-9][0-9]';
..
end;
TSQLDomainNumber2 = class(TSQLDomainNumber)
Size: 2;//max 2 character
Filter/Pattern/constrain:'[0-9][0-9]';
..
end;
//SQLRecord
TSQLBaseNumber = class(TSQLRecord)
private
fCode: TSQLDomainCode;
published
property Code: TSQLDomainCode read fCode write fCode;
end;
TSQLNumber4 = class(TSQLBaseNumber)
private
fNumberText: TSQLDomainNumber4;
published
property NumberText: TSQLDomainNumber3 read fNumberText write fNumberText;
end;
TSQLNumber3 = class(TSQLBaseNumber)
private
fNumberText: TSQLDomainNumber3;
published
property NumberText: TSQLDomainNumber3 read fNumberText write fNumberText;
end;
TSQLNumber2 = class(TSQLBaseNumber)
private
fNumberText: TSQLDomainNumber2;
published
property NumberText: TSQLDomainNumber2 read fNumberText write fNumberText;
end;
thank you.
Offline
The framework is domain-driven, from the group up.
You can't define your own type of data as such: it does not make sense from the Delphi point of view.
All those class definitions do not refer to anything valid, from the Delphi perspective.
So you do not have such a class definition, but what you need is, as stated by the documentation, includes Validation and Filtering within the database model, shared on both client and server side.
We recommend using a global function for creating the TSQLModel of the application, then add filters and validators to each kind of TSQLRecord, at this step.
Then, additional User Interface related elements can be defined in TSQLRibbonTabParameters constants.
This is all explained in the framework documentation.
Offline
ok. thank you.
Offline
Pages: 1