unit schControlesServer_Intf;

interface

uses
  Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, schControlesClient_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_ListaControlesPorCategoriaDelta = '{65EAE0A6-0E97-4F81-A0E0-E554B067286C}';

type
  { IListaControlesPorCategoriaDelta }
  IListaControlesPorCategoriaDelta = interface(IListaControlesPorCategoria)
  ['{65EAE0A6-0E97-4F81-A0E0-E554B067286C}']
    { Property getters and setters }
    function GetOldIDValue : Integer;
    function GetOldCATEGORIAValue : String;
    function GetOldMODIFICABLEValue : String;
    function GetOldICONOValue : Integer;
    function GetOldNOMBREValue : String;
    function GetOldDESCRIPCIONValue : String;
    function GetOldORDENValue : Integer;
    function GetOldVISTAValue : IROStrings;

    { Properties }
    property OldID : Integer read GetOldIDValue;
    property OldCATEGORIA : String read GetOldCATEGORIAValue;
    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;
  end;

  { TListaControlesPorCategoriaBusinessProcessorRules }
  TListaControlesPorCategoriaBusinessProcessorRules = class(TDABusinessProcessorRules, IListaControlesPorCategoria, IListaControlesPorCategoriaDelta)
  private
  protected
    { Property getters and setters }
    function GetIDValue: Integer; virtual;
    function GetOldIDValue: Integer; virtual;
    procedure SetIDValue(const aValue: Integer); virtual;
    function GetCATEGORIAValue: String; virtual;
    function GetOldCATEGORIAValue: String; virtual;
    procedure SetCATEGORIAValue(const aValue: String); virtual;
    function GetMODIFICABLEValue: String; virtual;
    function GetOldMODIFICABLEValue: String; virtual;
    procedure SetMODIFICABLEValue(const aValue: String); virtual;
    function GetICONOValue: Integer; virtual;
    function GetOldICONOValue: Integer; virtual;
    procedure SetICONOValue(const aValue: Integer); virtual;
    function GetNOMBREValue: String; virtual;
    function GetOldNOMBREValue: String; virtual;
    procedure SetNOMBREValue(const aValue: String); virtual;
    function GetDESCRIPCIONValue: String; virtual;
    function GetOldDESCRIPCIONValue: String; virtual;
    procedure SetDESCRIPCIONValue(const aValue: String); virtual;
    function GetORDENValue: Integer; virtual;
    function GetOldORDENValue: Integer; virtual;
    procedure SetORDENValue(const aValue: Integer); virtual;
    function GetVISTAValue: IROStrings; virtual;
    function GetOldVISTAValue: IROStrings; virtual;
    procedure SetVISTAValue(const aValue: IROStrings); virtual;

    { Properties }
    property ID : Integer read GetIDValue write SetIDValue;
    property OldID : Integer read GetOldIDValue;
    property CATEGORIA : String read GetCATEGORIAValue write SetCATEGORIAValue;
    property OldCATEGORIA : String read GetOldCATEGORIAValue;
    property MODIFICABLE : String read GetMODIFICABLEValue write SetMODIFICABLEValue;
    property OldMODIFICABLE : String read GetOldMODIFICABLEValue;
    property ICONO : Integer read GetICONOValue write SetICONOValue;
    property OldICONO : Integer read GetOldICONOValue;
    property NOMBRE : String read GetNOMBREValue write SetNOMBREValue;
    property OldNOMBRE : String read GetOldNOMBREValue;
    property DESCRIPCION : String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
    property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
    property ORDEN : Integer read GetORDENValue write SetORDENValue;
    property OldORDEN : Integer read GetOldORDENValue;
    property VISTA : IROStrings read GetVISTAValue write SetVISTAValue;
    property OldVISTA : IROStrings read GetOldVISTAValue;

  public
    constructor Create(aBusinessProcessor: TDABusinessProcessor); override;
    destructor Destroy; override;

  end;

implementation

uses
  Variants, uROBinaryHelpers;

{ TListaControlesPorCategoriaBusinessProcessorRules }
constructor TListaControlesPorCategoriaBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
  inherited;
end;

destructor TListaControlesPorCategoriaBusinessProcessorRules.Destroy;
begin
  inherited;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaID];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldIDValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaID];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaID] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetCATEGORIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaCATEGORIA];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldCATEGORIAValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaCATEGORIA];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetCATEGORIAValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaCATEGORIA] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetMODIFICABLEValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaMODIFICABLE];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldMODIFICABLEValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaMODIFICABLE];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetMODIFICABLEValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaMODIFICABLE] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetICONOValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaICONO];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldICONOValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaICONO];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetICONOValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaICONO] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetNOMBREValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaNOMBRE];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldNOMBREValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaNOMBRE];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetNOMBREValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaNOMBRE] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaDESCRIPCION];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaDESCRIPCION];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaDESCRIPCION] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetORDENValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaORDEN];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldORDENValue: Integer;
begin
  result := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaORDEN];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetORDENValue(const aValue: Integer);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaORDEN] := aValue;
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetVISTAValue: IROStrings;
begin
  result := NewROStrings();
  result.Text := BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaVISTA];
end;

function TListaControlesPorCategoriaBusinessProcessorRules.GetOldVISTAValue: IROStrings;
begin
  result := NewROStrings();
  result.Text := BusinessProcessor.CurrentChange.OldValueByName[fld_ListaControlesPorCategoriaVISTA];
end;

procedure TListaControlesPorCategoriaBusinessProcessorRules.SetVISTAValue(const aValue: IROStrings);
begin
  BusinessProcessor.CurrentChange.NewValueByName[fld_ListaControlesPorCategoriaVISTA] := aValue.Text;
end;


initialization
  RegisterBusinessProcessorRules(RID_ListaControlesPorCategoriaDelta, TListaControlesPorCategoriaBusinessProcessorRules);

end.
