unit schInformesServer_Intf; interface uses Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, schInformesClient_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_InformesDelta = '{E59067A7-484D-452E-9F02-411C0022180B}'; type { IInformesDelta } IInformesDelta = interface(IInformes) ['{E59067A7-484D-452E-9F02-411C0022180B}'] { Property getters and setters } function GetOldIDValue : Integer; function GetOldID_EMPRESAValue : Integer; function GetOldCATEGORIAValue : String; function GetOldCONTROLLERValue : String; function GetOldMODIFICABLEValue : String; function GetOldICONOValue : Integer; function GetOldNOMBREValue : String; function GetOldDESCRIPCIONValue : String; function GetOldORDENValue : Integer; function GetOldVISTAValue : IROStrings; function GetOldTIPO_AGRUPACIONValue : Integer; { Properties } property OldID : Integer read GetOldIDValue; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property OldCATEGORIA : String read GetOldCATEGORIAValue; property OldCONTROLLER : String read GetOldCONTROLLERValue; property OldMODIFICABLE : String read GetOldMODIFICABLEValue; property OldICONO : Integer read GetOldICONOValue; property OldNOMBRE : String read GetOldNOMBREValue; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; property OldORDEN : Integer read GetOldORDENValue; property OldVISTA : IROStrings read GetOldVISTAValue; property OldTIPO_AGRUPACION : Integer read GetOldTIPO_AGRUPACIONValue; end; { TInformesBusinessProcessorRules } TInformesBusinessProcessorRules = class(TDABusinessProcessorRules, IInformes, IInformesDelta) private f_VISTA: IROStrings; procedure VISTA_OnChange(Sender: TObject); 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 GetID_EMPRESAValue: Integer; virtual; function GetID_EMPRESAIsNull: Boolean; virtual; function GetOldID_EMPRESAValue: Integer; virtual; function GetOldID_EMPRESAIsNull: Boolean; virtual; procedure SetID_EMPRESAValue(const aValue: Integer); virtual; procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual; function GetCATEGORIAValue: String; virtual; function GetCATEGORIAIsNull: Boolean; virtual; function GetOldCATEGORIAValue: String; virtual; function GetOldCATEGORIAIsNull: Boolean; virtual; procedure SetCATEGORIAValue(const aValue: String); virtual; procedure SetCATEGORIAIsNull(const aValue: Boolean); virtual; function GetCONTROLLERValue: String; virtual; function GetCONTROLLERIsNull: Boolean; virtual; function GetOldCONTROLLERValue: String; virtual; function GetOldCONTROLLERIsNull: Boolean; virtual; procedure SetCONTROLLERValue(const aValue: String); virtual; procedure SetCONTROLLERIsNull(const aValue: Boolean); virtual; function GetMODIFICABLEValue: String; virtual; function GetMODIFICABLEIsNull: Boolean; virtual; function GetOldMODIFICABLEValue: String; virtual; function GetOldMODIFICABLEIsNull: Boolean; virtual; procedure SetMODIFICABLEValue(const aValue: String); virtual; procedure SetMODIFICABLEIsNull(const aValue: Boolean); virtual; function GetICONOValue: Integer; virtual; function GetICONOIsNull: Boolean; virtual; function GetOldICONOValue: Integer; virtual; function GetOldICONOIsNull: Boolean; virtual; procedure SetICONOValue(const aValue: Integer); virtual; procedure SetICONOIsNull(const aValue: Boolean); virtual; function GetNOMBREValue: String; virtual; function GetNOMBREIsNull: Boolean; virtual; function GetOldNOMBREValue: String; virtual; function GetOldNOMBREIsNull: Boolean; virtual; procedure SetNOMBREValue(const aValue: String); virtual; procedure SetNOMBREIsNull(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; function GetORDENValue: Integer; virtual; function GetORDENIsNull: Boolean; virtual; function GetOldORDENValue: Integer; virtual; function GetOldORDENIsNull: Boolean; virtual; procedure SetORDENValue(const aValue: Integer); virtual; procedure SetORDENIsNull(const aValue: Boolean); virtual; function GetVISTAValue: IROStrings; virtual; function GetVISTAIsNull: Boolean; virtual; function GetOldVISTAValue: IROStrings; virtual; function GetOldVISTAIsNull: Boolean; virtual; procedure SetVISTAIsNull(const aValue: Boolean); virtual; function GetTIPO_AGRUPACIONValue: Integer; virtual; function GetTIPO_AGRUPACIONIsNull: Boolean; virtual; function GetOldTIPO_AGRUPACIONValue: Integer; virtual; function GetOldTIPO_AGRUPACIONIsNull: Boolean; virtual; procedure SetTIPO_AGRUPACIONValue(const aValue: Integer); virtual; procedure SetTIPO_AGRUPACIONIsNull(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 ID_EMPRESA : Integer read GetID_EMPRESAValue write SetID_EMPRESAValue; property ID_EMPRESAIsNull : Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull; property OldID_EMPRESA : Integer read GetOldID_EMPRESAValue; property OldID_EMPRESAIsNull : Boolean read GetOldID_EMPRESAIsNull; property CATEGORIA : String read GetCATEGORIAValue write SetCATEGORIAValue; property CATEGORIAIsNull : Boolean read GetCATEGORIAIsNull write SetCATEGORIAIsNull; property OldCATEGORIA : String read GetOldCATEGORIAValue; property OldCATEGORIAIsNull : Boolean read GetOldCATEGORIAIsNull; property CONTROLLER : String read GetCONTROLLERValue write SetCONTROLLERValue; property CONTROLLERIsNull : Boolean read GetCONTROLLERIsNull write SetCONTROLLERIsNull; property OldCONTROLLER : String read GetOldCONTROLLERValue; property OldCONTROLLERIsNull : Boolean read GetOldCONTROLLERIsNull; property MODIFICABLE : String read GetMODIFICABLEValue write SetMODIFICABLEValue; property MODIFICABLEIsNull : Boolean read GetMODIFICABLEIsNull write SetMODIFICABLEIsNull; property OldMODIFICABLE : String read GetOldMODIFICABLEValue; property OldMODIFICABLEIsNull : Boolean read GetOldMODIFICABLEIsNull; property ICONO : Integer read GetICONOValue write SetICONOValue; property ICONOIsNull : Boolean read GetICONOIsNull write SetICONOIsNull; property OldICONO : Integer read GetOldICONOValue; property OldICONOIsNull : Boolean read GetOldICONOIsNull; property NOMBRE : String read GetNOMBREValue write SetNOMBREValue; property NOMBREIsNull : Boolean read GetNOMBREIsNull write SetNOMBREIsNull; property OldNOMBRE : String read GetOldNOMBREValue; property OldNOMBREIsNull : Boolean read GetOldNOMBREIsNull; property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue; property DESCRIPCIONIsNull : Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull; property OldDESCRIPCION : String read GetOldDESCRIPCIONValue; property OldDESCRIPCIONIsNull : Boolean read GetOldDESCRIPCIONIsNull; property ORDEN : Integer read GetORDENValue write SetORDENValue; property ORDENIsNull : Boolean read GetORDENIsNull write SetORDENIsNull; property OldORDEN : Integer read GetOldORDENValue; property OldORDENIsNull : Boolean read GetOldORDENIsNull; property VISTA : IROStrings read GetVISTAValue; property VISTAIsNull : Boolean read GetVISTAIsNull write SetVISTAIsNull; property OldVISTA : IROStrings read GetOldVISTAValue; property OldVISTAIsNull : Boolean read GetOldVISTAIsNull; property TIPO_AGRUPACION : Integer read GetTIPO_AGRUPACIONValue write SetTIPO_AGRUPACIONValue; property TIPO_AGRUPACIONIsNull : Boolean read GetTIPO_AGRUPACIONIsNull write SetTIPO_AGRUPACIONIsNull; property OldTIPO_AGRUPACION : Integer read GetOldTIPO_AGRUPACIONValue; property OldTIPO_AGRUPACIONIsNull : Boolean read GetOldTIPO_AGRUPACIONIsNull; public constructor Create(aBusinessProcessor: TDABusinessProcessor); override; destructor Destroy; override; end; implementation uses Variants, uROBinaryHelpers, uDAInterfaces; { TInformesBusinessProcessorRules } constructor TInformesBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor); var StrList: TStringList; begin inherited; StrList := TStringList.Create; StrList.OnChange := VISTA_OnChange; f_VISTA := NewROStrings(StrList,True); end; destructor TInformesBusinessProcessorRules.Destroy; begin inherited; end; procedure TInformesBusinessProcessorRules.VISTA_OnChange(Sender: TObject); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesVISTA] := TStringList(Sender).Text; end; function TInformesBusinessProcessorRules.GetIDValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID]; end; function TInformesBusinessProcessorRules.GetIDIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID]); end; function TInformesBusinessProcessorRules.GetOldIDValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesID]; end; function TInformesBusinessProcessorRules.GetOldIDIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesID]); end; procedure TInformesBusinessProcessorRules.SetIDValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID] := aValue; end; procedure TInformesBusinessProcessorRules.SetIDIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID] := Null; end; function TInformesBusinessProcessorRules.GetID_EMPRESAValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID_EMPRESA]; end; function TInformesBusinessProcessorRules.GetID_EMPRESAIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID_EMPRESA]); end; function TInformesBusinessProcessorRules.GetOldID_EMPRESAValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesID_EMPRESA]; end; function TInformesBusinessProcessorRules.GetOldID_EMPRESAIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesID_EMPRESA]); end; procedure TInformesBusinessProcessorRules.SetID_EMPRESAValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID_EMPRESA] := aValue; end; procedure TInformesBusinessProcessorRules.SetID_EMPRESAIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesID_EMPRESA] := Null; end; function TInformesBusinessProcessorRules.GetCATEGORIAValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCATEGORIA]; end; function TInformesBusinessProcessorRules.GetCATEGORIAIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCATEGORIA]); end; function TInformesBusinessProcessorRules.GetOldCATEGORIAValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesCATEGORIA]; end; function TInformesBusinessProcessorRules.GetOldCATEGORIAIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesCATEGORIA]); end; procedure TInformesBusinessProcessorRules.SetCATEGORIAValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCATEGORIA] := aValue; end; procedure TInformesBusinessProcessorRules.SetCATEGORIAIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCATEGORIA] := Null; end; function TInformesBusinessProcessorRules.GetCONTROLLERValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCONTROLLER]; end; function TInformesBusinessProcessorRules.GetCONTROLLERIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCONTROLLER]); end; function TInformesBusinessProcessorRules.GetOldCONTROLLERValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesCONTROLLER]; end; function TInformesBusinessProcessorRules.GetOldCONTROLLERIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesCONTROLLER]); end; procedure TInformesBusinessProcessorRules.SetCONTROLLERValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCONTROLLER] := aValue; end; procedure TInformesBusinessProcessorRules.SetCONTROLLERIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesCONTROLLER] := Null; end; function TInformesBusinessProcessorRules.GetMODIFICABLEValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesMODIFICABLE]; end; function TInformesBusinessProcessorRules.GetMODIFICABLEIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesMODIFICABLE]); end; function TInformesBusinessProcessorRules.GetOldMODIFICABLEValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesMODIFICABLE]; end; function TInformesBusinessProcessorRules.GetOldMODIFICABLEIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesMODIFICABLE]); end; procedure TInformesBusinessProcessorRules.SetMODIFICABLEValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesMODIFICABLE] := aValue; end; procedure TInformesBusinessProcessorRules.SetMODIFICABLEIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesMODIFICABLE] := Null; end; function TInformesBusinessProcessorRules.GetICONOValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesICONO]; end; function TInformesBusinessProcessorRules.GetICONOIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesICONO]); end; function TInformesBusinessProcessorRules.GetOldICONOValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesICONO]; end; function TInformesBusinessProcessorRules.GetOldICONOIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesICONO]); end; procedure TInformesBusinessProcessorRules.SetICONOValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesICONO] := aValue; end; procedure TInformesBusinessProcessorRules.SetICONOIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesICONO] := Null; end; function TInformesBusinessProcessorRules.GetNOMBREValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesNOMBRE]; end; function TInformesBusinessProcessorRules.GetNOMBREIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesNOMBRE]); end; function TInformesBusinessProcessorRules.GetOldNOMBREValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesNOMBRE]; end; function TInformesBusinessProcessorRules.GetOldNOMBREIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesNOMBRE]); end; procedure TInformesBusinessProcessorRules.SetNOMBREValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesNOMBRE] := aValue; end; procedure TInformesBusinessProcessorRules.SetNOMBREIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesNOMBRE] := Null; end; function TInformesBusinessProcessorRules.GetDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesDESCRIPCION]; end; function TInformesBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesDESCRIPCION]); end; function TInformesBusinessProcessorRules.GetOldDESCRIPCIONValue: String; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesDESCRIPCION]; end; function TInformesBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesDESCRIPCION]); end; procedure TInformesBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesDESCRIPCION] := aValue; end; procedure TInformesBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesDESCRIPCION] := Null; end; function TInformesBusinessProcessorRules.GetORDENValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesORDEN]; end; function TInformesBusinessProcessorRules.GetORDENIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesORDEN]); end; function TInformesBusinessProcessorRules.GetOldORDENValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesORDEN]; end; function TInformesBusinessProcessorRules.GetOldORDENIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesORDEN]); end; procedure TInformesBusinessProcessorRules.SetORDENValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesORDEN] := aValue; end; procedure TInformesBusinessProcessorRules.SetORDENIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesORDEN] := Null; end; function TInformesBusinessProcessorRules.GetVISTAValue: IROStrings; begin result := f_VISTA; result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesVISTA]; end; function TInformesBusinessProcessorRules.GetVISTAIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesVISTA]); end; function TInformesBusinessProcessorRules.GetOldVISTAValue: IROStrings; begin result := NewROStrings(); result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesVISTA]; end; function TInformesBusinessProcessorRules.GetOldVISTAIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesVISTA]); end; procedure TInformesBusinessProcessorRules.SetVISTAIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesVISTA] := Null; end; function TInformesBusinessProcessorRules.GetTIPO_AGRUPACIONValue: Integer; begin result := BusinessProcessor.CurrentChange.NewValueByName[fld_InformesTIPO_AGRUPACION]; end; function TInformesBusinessProcessorRules.GetTIPO_AGRUPACIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_InformesTIPO_AGRUPACION]); end; function TInformesBusinessProcessorRules.GetOldTIPO_AGRUPACIONValue: Integer; begin result := BusinessProcessor.CurrentChange.OldValueByName[fld_InformesTIPO_AGRUPACION]; end; function TInformesBusinessProcessorRules.GetOldTIPO_AGRUPACIONIsNull: Boolean; begin result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_InformesTIPO_AGRUPACION]); end; procedure TInformesBusinessProcessorRules.SetTIPO_AGRUPACIONValue(const aValue: Integer); begin BusinessProcessor.CurrentChange.NewValueByName[fld_InformesTIPO_AGRUPACION] := aValue; end; procedure TInformesBusinessProcessorRules.SetTIPO_AGRUPACIONIsNull(const aValue: Boolean); begin if aValue then BusinessProcessor.CurrentChange.NewValueByName[fld_InformesTIPO_AGRUPACION] := Null; end; initialization RegisterBusinessProcessorRules(RID_InformesDelta, TInformesBusinessProcessorRules); end.