AbetoDesign_FactuGES2/Source/Modulos/Subfamilias/Model/schSubfamiliasServer_Intf.pas

144 lines
4.9 KiB
ObjectPascal

unit schSubfamiliasServer_Intf;
interface
uses
Classes, DB, SysUtils, uROClasses, uDADataTable, uDABusinessProcessor, FmtBCD, uROXMLIntf, schSubfamiliasClient_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_SubfamiliasDelta = '{3C2DC56F-75DA-4C52-9298-BFC3AAE284F1}';
type
{ ISubfamiliasDelta }
ISubfamiliasDelta = interface(ISubfamilias)
['{3C2DC56F-75DA-4C52-9298-BFC3AAE284F1}']
{ Property getters and setters }
function GetOldIDValue : Integer;
function GetOldDESCRIPCIONValue : String;
{ Properties }
property OldID : Integer read GetOldIDValue;
property OldDESCRIPCION : String read GetOldDESCRIPCIONValue;
end;
{ TSubfamiliasBusinessProcessorRules }
TSubfamiliasBusinessProcessorRules = class(TDABusinessProcessorRules, ISubfamilias, ISubfamiliasDelta)
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;
{ TSubfamiliasBusinessProcessorRules }
constructor TSubfamiliasBusinessProcessorRules.Create(aBusinessProcessor: TDABusinessProcessor);
begin
inherited;
end;
destructor TSubfamiliasBusinessProcessorRules.Destroy;
begin
inherited;
end;
function TSubfamiliasBusinessProcessorRules.GetIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasID];
end;
function TSubfamiliasBusinessProcessorRules.GetIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasID]);
end;
function TSubfamiliasBusinessProcessorRules.GetOldIDValue: Integer;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_SubfamiliasID];
end;
function TSubfamiliasBusinessProcessorRules.GetOldIDIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_SubfamiliasID]);
end;
procedure TSubfamiliasBusinessProcessorRules.SetIDValue(const aValue: Integer);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasID] := aValue;
end;
procedure TSubfamiliasBusinessProcessorRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasID] := Null;
end;
function TSubfamiliasBusinessProcessorRules.GetDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasDESCRIPCION];
end;
function TSubfamiliasBusinessProcessorRules.GetDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasDESCRIPCION]);
end;
function TSubfamiliasBusinessProcessorRules.GetOldDESCRIPCIONValue: String;
begin
result := BusinessProcessor.CurrentChange.OldValueByName[fld_SubfamiliasDESCRIPCION];
end;
function TSubfamiliasBusinessProcessorRules.GetOldDESCRIPCIONIsNull: Boolean;
begin
result := VarIsNull(BusinessProcessor.CurrentChange.OldValueByName[fld_SubfamiliasDESCRIPCION]);
end;
procedure TSubfamiliasBusinessProcessorRules.SetDESCRIPCIONValue(const aValue: String);
begin
BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasDESCRIPCION] := aValue;
end;
procedure TSubfamiliasBusinessProcessorRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
BusinessProcessor.CurrentChange.NewValueByName[fld_SubfamiliasDESCRIPCION] := Null;
end;
initialization
RegisterBusinessProcessorRules(RID_SubfamiliasDelta, TSubfamiliasBusinessProcessorRules);
end.