unit schDelegacionesServer_Intf; interface uses Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, schDelegacionesClient_Intf; const { Delta 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_DelegacionesDelta = '{69DBAF9C-CA9F-4F5F-91BC-0AD7767FEC0B}'; type { IDelegacionesDelta } IDelegacionesDelta = interface(IDelegaciones) ['{69DBAF9C-CA9F-4F5F-91BC-0AD7767FEC0B}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldDESCRIPCIONValue : String; { Properties } property OldID : Integer read GetOldIDValue; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; end; { TDelegacionesBusinessProcessorRules } TDelegacionesBusinessProcessorRules = class(TDABusinessProcessorRules, IDelegaciones, IDelegacionesDelta) private protected { Property getters and setters } function GetIDValue: Integer; virtual; function GetIDIsNull: Boolean; virtual; function GetOldIDValue: Integer; virtual; function GetOldIDIsNull: Boolean; virtual; procedure SetIDValue(const aValue: Integer); virtual; procedure SetIDIsNull(const aValue: Boolean); virtual; function GetDESCRIPCIONValue: String; virtual; function GetDESCRIPCIONIsNull: Boolean; virtual; function GetOldDESCRIPCIONValue: String; virtual; function GetOldDESCRIPCIONIsNull: Boolean; virtual; procedure SetDESCRIPCIONValue(const aValue: String); virtual; procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual; { Properties } property ID : Integer read GetIDValue write SetIDValue; property IDIsNull : Boolean read GetIDIsNull write SetIDIsNull; property OldID : Integer read GetOldIDValue; property OldIDIsNull : Boolean read GetOldIDIsNull; property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers, uDAInterfaces; { TDelegacionesBusinessProcessorRules } constructor TDelegacionesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); begin inherited; end; destructor TDelegacionesBusinessProcessorRules.Destroy; begin inherited; end; function TDelegacionesBusinessProcessorRules.GetIDValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesID]; end; function TDelegacionesBusinessProcessorRules.GetIDIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesID]); end; function TDelegacionesBusinessProcessorRules.GetOldIDValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_DelegacionesID]; end; function TDelegacionesBusinessProcessorRules.GetOldIDIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DelegacionesID]); end; procedure TDelegacionesBusinessProcessorRules.SetIDValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesID] := aValue; end; procedure TDelegacionesBusinessProcessorRules.SetIDIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesID] := Null; end; function TDelegacionesBusinessProcessorRules.GetDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesDESCRIPCION]; end; function TDelegacionesBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesDESCRIPCION]); end; function TDelegacionesBusinessProcessorRules.GetOldDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_DelegacionesDESCRIPCION]; end; function TDelegacionesBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_DelegacionesDESCRIPCION]); end; procedure TDelegacionesBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesDESCRIPCION] := aValue; end; procedure TDelegacionesBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_DelegacionesDESCRIPCION] := Null; end; initialization RegisterBusinessProcessorRules(RID_DelegacionesDelta, TDelegacionesBusinessProcessorRules); end.