unit schCuentasEspecialesClient_Intf; interface uses Classes, DB, schBase_Intf, SysUtils, uROClasses, uDADataTable, FmtBCD, uROXMLIntf; const { Data table rules ids Feel free to change them to something more human readable but make sure they are unique in the context of your application } RID_CuentasEspeciales = '{C09A6BA6-0310-40A2-A083-A773491B0DC3}'; { Data table names } nme_CuentasEspeciales = 'CuentasEspeciales'; { CuentasEspeciales fields } fld_CuentasEspecialesID = 'ID'; fld_CuentasEspecialesREFERENCIA = 'REFERENCIA'; fld_CuentasEspecialesDESCRIPCION = 'DESCRIPCION'; { CuentasEspeciales field indexes } idx_CuentasEspecialesID = 0; idx_CuentasEspecialesREFERENCIA = 1; idx_CuentasEspecialesDESCRIPCION = 2; type { ICuentasEspeciales } ICuentasEspeciales = interface(IDAStronglyTypedDataTable) ['{7D1B09A1-B0F3-4C6A-B03A-9EBC8A52DAB8}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetIDIsNull: Boolean; procedure SetIDIsNull(const aValue: Boolean); function GetREFERENCIAValue: String; procedure SetREFERENCIAValue(const aValue: String); function GetREFERENCIAIsNull: Boolean; procedure SetREFERENCIAIsNull(const aValue: Boolean); function GetDESCRIPCIONValue: String; procedure SetDESCRIPCIONValue(const aValue: String); function GetDESCRIPCIONIsNull: Boolean; procedure SetDESCRIPCIONIsNull(const aValue: Boolean); { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull; property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; end; { TCuentasEspecialesDataTableRules } TCuentasEspecialesDataTableRules = class(TIntfObjectDADataTableRules, ICuentasEspeciales) private protected { Property getters and setters } function GetIDValue: Integer; virtual; procedure SetIDValue(const aValue: Integer); virtual; function GetIDIsNull: Boolean; virtual; procedure SetIDIsNull(const aValue: Boolean); virtual; function GetREFERENCIAValue: String; virtual; procedure SetREFERENCIAValue(const aValue: String); virtual; function GetREFERENCIAIsNull: Boolean; virtual; procedure SetREFERENCIAIsNull(const aValue: Boolean); virtual; function GetDESCRIPCIONValue: String; virtual; procedure SetDESCRIPCIONValue(const aValue: String); virtual; function GetDESCRIPCIONIsNull: Boolean; virtual; procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property REFERENCIA: String read GetREFERENCIAValue write SetREFERENCIAValue; property REFERENCIAIsNull: Boolean read GetREFERENCIAIsNull write SetREFERENCIAIsNull; property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers; { TCuentasEspecialesDataTableRules } constructor TCuentasEspecialesDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TCuentasEspecialesDataTableRules.Destroy; begin inherited; end; function TCuentasEspecialesDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_CuentasEspecialesID].AsInteger; end; procedure TCuentasEspecialesDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_CuentasEspecialesID].AsInteger := aValue; end; function TCuentasEspecialesDataTableRules.GetIDIsNull: boolean; begin result := DataTable.Fields[idx_CuentasEspecialesID].IsNull; end; procedure TCuentasEspecialesDataTableRules.SetIDIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_CuentasEspecialesID].AsVariant := Null; end; function TCuentasEspecialesDataTableRules.GetREFERENCIAValue: String; begin result := DataTable.Fields[idx_CuentasEspecialesREFERENCIA].AsString; end; procedure TCuentasEspecialesDataTableRules.SetREFERENCIAValue(const aValue: String); begin DataTable.Fields[idx_CuentasEspecialesREFERENCIA].AsString := aValue; end; function TCuentasEspecialesDataTableRules.GetREFERENCIAIsNull: boolean; begin result := DataTable.Fields[idx_CuentasEspecialesREFERENCIA].IsNull; end; procedure TCuentasEspecialesDataTableRules.SetREFERENCIAIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_CuentasEspecialesREFERENCIA].AsVariant := Null; end; function TCuentasEspecialesDataTableRules.GetDESCRIPCIONValue: String; begin result := DataTable.Fields[idx_CuentasEspecialesDESCRIPCION].AsString; end; procedure TCuentasEspecialesDataTableRules.SetDESCRIPCIONValue(const aValue: String); begin DataTable.Fields[idx_CuentasEspecialesDESCRIPCION].AsString := aValue; end; function TCuentasEspecialesDataTableRules.GetDESCRIPCIONIsNull: boolean; begin result := DataTable.Fields[idx_CuentasEspecialesDESCRIPCION].IsNull; end; procedure TCuentasEspecialesDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_CuentasEspecialesDESCRIPCION].AsVariant := Null; end; initialization RegisterDataTableRules(RID_CuentasEspeciales, TCuentasEspecialesDataTableRules); end.