unit schEpigrafesClient_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_Epigrafes = '{2883B260-70C3-4907-B2C1-A5377D0B2276}'; { Data table names } nme_Epigrafes = 'Epigrafes'; { Epigrafes fields } fld_EpigrafesID = 'ID'; fld_EpigrafesREF_EPIGRAFE = 'REF_EPIGRAFE'; fld_EpigrafesID_PADRE = 'ID_PADRE'; fld_EpigrafesDESCRIPCION = 'DESCRIPCION'; fld_EpigrafesID_EJERCICIO = 'ID_EJERCICIO'; { Epigrafes field indexes } idx_EpigrafesID = 0; idx_EpigrafesREF_EPIGRAFE = 1; idx_EpigrafesID_PADRE = 2; idx_EpigrafesDESCRIPCION = 3; idx_EpigrafesID_EJERCICIO = 4; type { IEpigrafes } IEpigrafes = interface(IDAStronglyTypedDataTable) ['{624768B7-CB01-41E3-A334-D20D0342FB2C}'] { Property getters and setters } function GetIDValue: Integer; procedure SetIDValue(const aValue: Integer); function GetIDIsNull: Boolean; procedure SetIDIsNull(const aValue: Boolean); function GetREF_EPIGRAFEValue: String; procedure SetREF_EPIGRAFEValue(const aValue: String); function GetREF_EPIGRAFEIsNull: Boolean; procedure SetREF_EPIGRAFEIsNull(const aValue: Boolean); function GetID_PADREValue: Integer; procedure SetID_PADREValue(const aValue: Integer); function GetID_PADREIsNull: Boolean; procedure SetID_PADREIsNull(const aValue: Boolean); function GetDESCRIPCIONValue: String; procedure SetDESCRIPCIONValue(const aValue: String); function GetDESCRIPCIONIsNull: Boolean; procedure SetDESCRIPCIONIsNull(const aValue: Boolean); function GetID_EJERCICIOValue: Integer; procedure SetID_EJERCICIOValue(const aValue: Integer); function GetID_EJERCICIOIsNull: Boolean; procedure SetID_EJERCICIOIsNull(const aValue: Boolean); { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property REF_EPIGRAFE: String read GetREF_EPIGRAFEValue write SetREF_EPIGRAFEValue; property REF_EPIGRAFEIsNull: Boolean read GetREF_EPIGRAFEIsNull write SetREF_EPIGRAFEIsNull; property ID_PADRE: Integer read GetID_PADREValue write SetID_PADREValue; property ID_PADREIsNull: Boolean read GetID_PADREIsNull write SetID_PADREIsNull; property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue; property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull; end; { TEpigrafesDataTableRules } TEpigrafesDataTableRules = class(TIntfObjectDADataTableRules, IEpigrafes) 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 GetREF_EPIGRAFEValue: String; virtual; procedure SetREF_EPIGRAFEValue(const aValue: String); virtual; function GetREF_EPIGRAFEIsNull: Boolean; virtual; procedure SetREF_EPIGRAFEIsNull(const aValue: Boolean); virtual; function GetID_PADREValue: Integer; virtual; procedure SetID_PADREValue(const aValue: Integer); virtual; function GetID_PADREIsNull: Boolean; virtual; procedure SetID_PADREIsNull(const aValue: Boolean); virtual; function GetDESCRIPCIONValue: String; virtual; procedure SetDESCRIPCIONValue(const aValue: String); virtual; function GetDESCRIPCIONIsNull: Boolean; virtual; procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; function GetID_EJERCICIOValue: Integer; virtual; procedure SetID_EJERCICIOValue(const aValue: Integer); virtual; function GetID_EJERCICIOIsNull: Boolean; virtual; procedure SetID_EJERCICIOIsNull(const aValue: Boolean); virtual; { Properties } property ID: Integer read GetIDValue write SetIDValue; property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull; property REF_EPIGRAFE: String read GetREF_EPIGRAFEValue write SetREF_EPIGRAFEValue; property REF_EPIGRAFEIsNull: Boolean read GetREF_EPIGRAFEIsNull write SetREF_EPIGRAFEIsNull; property ID_PADRE: Integer read GetID_PADREValue write SetID_PADREValue; property ID_PADREIsNull: Boolean read GetID_PADREIsNull write SetID_PADREIsNull; property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; property ID_EJERCICIO: Integer read GetID_EJERCICIOValue write SetID_EJERCICIOValue; property ID_EJERCICIOIsNull: Boolean read GetID_EJERCICIOIsNull write SetID_EJERCICIOIsNull; public constructor Create(aDataTable: TDADataTable); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers; { TEpigrafesDataTableRules } constructor TEpigrafesDataTableRules.Create(aDataTable: TDADataTable); begin inherited; end; destructor TEpigrafesDataTableRules.Destroy; begin inherited; end; function TEpigrafesDataTableRules.GetIDValue: Integer; begin result := DataTable.Fields[idx_EpigrafesID].AsInteger; end; procedure TEpigrafesDataTableRules.SetIDValue(const aValue: Integer); begin DataTable.Fields[idx_EpigrafesID].AsInteger := aValue; end; function TEpigrafesDataTableRules.GetIDIsNull: boolean; begin result := DataTable.Fields[idx_EpigrafesID].IsNull; end; procedure TEpigrafesDataTableRules.SetIDIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EpigrafesID].AsVariant := Null; end; function TEpigrafesDataTableRules.GetREF_EPIGRAFEValue: String; begin result := DataTable.Fields[idx_EpigrafesREF_EPIGRAFE].AsString; end; procedure TEpigrafesDataTableRules.SetREF_EPIGRAFEValue(const aValue: String); begin DataTable.Fields[idx_EpigrafesREF_EPIGRAFE].AsString := aValue; end; function TEpigrafesDataTableRules.GetREF_EPIGRAFEIsNull: boolean; begin result := DataTable.Fields[idx_EpigrafesREF_EPIGRAFE].IsNull; end; procedure TEpigrafesDataTableRules.SetREF_EPIGRAFEIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EpigrafesREF_EPIGRAFE].AsVariant := Null; end; function TEpigrafesDataTableRules.GetID_PADREValue: Integer; begin result := DataTable.Fields[idx_EpigrafesID_PADRE].AsInteger; end; procedure TEpigrafesDataTableRules.SetID_PADREValue(const aValue: Integer); begin DataTable.Fields[idx_EpigrafesID_PADRE].AsInteger := aValue; end; function TEpigrafesDataTableRules.GetID_PADREIsNull: boolean; begin result := DataTable.Fields[idx_EpigrafesID_PADRE].IsNull; end; procedure TEpigrafesDataTableRules.SetID_PADREIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EpigrafesID_PADRE].AsVariant := Null; end; function TEpigrafesDataTableRules.GetDESCRIPCIONValue: String; begin result := DataTable.Fields[idx_EpigrafesDESCRIPCION].AsString; end; procedure TEpigrafesDataTableRules.SetDESCRIPCIONValue(const aValue: String); begin DataTable.Fields[idx_EpigrafesDESCRIPCION].AsString := aValue; end; function TEpigrafesDataTableRules.GetDESCRIPCIONIsNull: boolean; begin result := DataTable.Fields[idx_EpigrafesDESCRIPCION].IsNull; end; procedure TEpigrafesDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EpigrafesDESCRIPCION].AsVariant := Null; end; function TEpigrafesDataTableRules.GetID_EJERCICIOValue: Integer; begin result := DataTable.Fields[idx_EpigrafesID_EJERCICIO].AsInteger; end; procedure TEpigrafesDataTableRules.SetID_EJERCICIOValue(const aValue: Integer); begin DataTable.Fields[idx_EpigrafesID_EJERCICIO].AsInteger := aValue; end; function TEpigrafesDataTableRules.GetID_EJERCICIOIsNull: boolean; begin result := DataTable.Fields[idx_EpigrafesID_EJERCICIO].IsNull; end; procedure TEpigrafesDataTableRules.SetID_EJERCICIOIsNull(const aValue: Boolean); begin if aValue then DataTable.Fields[idx_EpigrafesID_EJERCICIO].AsVariant := Null; end; initialization RegisterDataTableRules(RID_Epigrafes, TEpigrafesDataTableRules); end.