Tecsitel_FactuGES2/Source/Modulos/Referencias/Model/schReferenciasClient_Intf.pas

240 lines
8.3 KiB
ObjectPascal

unit schReferenciasClient_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_Referencias = '{1D0B0E97-1F81-4567-A917-8842D05E643C}';
{ Data table names }
nme_Referencias = 'Referencias';
{ Referencias fields }
fld_ReferenciasID = 'ID';
fld_ReferenciasID_EMPRESA = 'ID_EMPRESA';
fld_ReferenciasCODIGO = 'CODIGO';
fld_ReferenciasVALOR = 'VALOR';
fld_ReferenciasDESCRIPCION = 'DESCRIPCION';
{ Referencias field indexes }
idx_ReferenciasID = 0;
idx_ReferenciasID_EMPRESA = 1;
idx_ReferenciasCODIGO = 2;
idx_ReferenciasVALOR = 3;
idx_ReferenciasDESCRIPCION = 4;
type
{ IReferencias }
IReferencias = interface(IDAStronglyTypedDataTable)
['{3DA139A5-F7C4-45BC-BD1F-F98C48FAE54F}']
{ Property getters and setters }
function GetIDValue: Integer;
procedure SetIDValue(const aValue: Integer);
function GetIDIsNull: Boolean;
procedure SetIDIsNull(const aValue: Boolean);
function GetID_EMPRESAValue: Integer;
procedure SetID_EMPRESAValue(const aValue: Integer);
function GetID_EMPRESAIsNull: Boolean;
procedure SetID_EMPRESAIsNull(const aValue: Boolean);
function GetCODIGOValue: String;
procedure SetCODIGOValue(const aValue: String);
function GetCODIGOIsNull: Boolean;
procedure SetCODIGOIsNull(const aValue: Boolean);
function GetVALORValue: String;
procedure SetVALORValue(const aValue: String);
function GetVALORIsNull: Boolean;
procedure SetVALORIsNull(const aValue: Boolean);
function GetDESCRIPCIONValue: String;
procedure SetDESCRIPCIONValue(const aValue: String);
function GetDESCRIPCIONIsNull: Boolean;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean);
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
property CODIGO: String read GetCODIGOValue write SetCODIGOValue;
property CODIGOIsNull: Boolean read GetCODIGOIsNull write SetCODIGOIsNull;
property VALOR: String read GetVALORValue write SetVALORValue;
property VALORIsNull: Boolean read GetVALORIsNull write SetVALORIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
end;
{ TReferenciasDataTableRules }
TReferenciasDataTableRules = class(TIntfObjectDADataTableRules, IReferencias)
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 GetID_EMPRESAValue: Integer; virtual;
procedure SetID_EMPRESAValue(const aValue: Integer); virtual;
function GetID_EMPRESAIsNull: Boolean; virtual;
procedure SetID_EMPRESAIsNull(const aValue: Boolean); virtual;
function GetCODIGOValue: String; virtual;
procedure SetCODIGOValue(const aValue: String); virtual;
function GetCODIGOIsNull: Boolean; virtual;
procedure SetCODIGOIsNull(const aValue: Boolean); virtual;
function GetVALORValue: String; virtual;
procedure SetVALORValue(const aValue: String); virtual;
function GetVALORIsNull: Boolean; virtual;
procedure SetVALORIsNull(const aValue: Boolean); virtual;
function GetDESCRIPCIONValue: String; virtual;
procedure SetDESCRIPCIONValue(const aValue: String); virtual;
function GetDESCRIPCIONIsNull: Boolean; virtual;
procedure SetDESCRIPCIONIsNull(const aValue: Boolean); virtual;
{ Properties }
property ID: Integer read GetIDValue write SetIDValue;
property IDIsNull: Boolean read GetIDIsNull write SetIDIsNull;
property ID_EMPRESA: Integer read GetID_EMPRESAValue write SetID_EMPRESAValue;
property ID_EMPRESAIsNull: Boolean read GetID_EMPRESAIsNull write SetID_EMPRESAIsNull;
property CODIGO: String read GetCODIGOValue write SetCODIGOValue;
property CODIGOIsNull: Boolean read GetCODIGOIsNull write SetCODIGOIsNull;
property VALOR: String read GetVALORValue write SetVALORValue;
property VALORIsNull: Boolean read GetVALORIsNull write SetVALORIsNull;
property DESCRIPCION: String read GetDESCRIPCIONValue write SetDESCRIPCIONValue;
property DESCRIPCIONIsNull: Boolean read GetDESCRIPCIONIsNull write SetDESCRIPCIONIsNull;
public
constructor Create(aDataTable: TDADataTable); override;
destructor Destroy; override;
end;
implementation
uses Variants, uROBinaryHelpers;
{ TReferenciasDataTableRules }
constructor TReferenciasDataTableRules.Create(aDataTable: TDADataTable);
begin
inherited;
end;
destructor TReferenciasDataTableRules.Destroy;
begin
inherited;
end;
function TReferenciasDataTableRules.GetIDValue: Integer;
begin
result := DataTable.Fields[idx_ReferenciasID].AsInteger;
end;
procedure TReferenciasDataTableRules.SetIDValue(const aValue: Integer);
begin
DataTable.Fields[idx_ReferenciasID].AsInteger := aValue;
end;
function TReferenciasDataTableRules.GetIDIsNull: boolean;
begin
result := DataTable.Fields[idx_ReferenciasID].IsNull;
end;
procedure TReferenciasDataTableRules.SetIDIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ReferenciasID].AsVariant := Null;
end;
function TReferenciasDataTableRules.GetID_EMPRESAValue: Integer;
begin
result := DataTable.Fields[idx_ReferenciasID_EMPRESA].AsInteger;
end;
procedure TReferenciasDataTableRules.SetID_EMPRESAValue(const aValue: Integer);
begin
DataTable.Fields[idx_ReferenciasID_EMPRESA].AsInteger := aValue;
end;
function TReferenciasDataTableRules.GetID_EMPRESAIsNull: boolean;
begin
result := DataTable.Fields[idx_ReferenciasID_EMPRESA].IsNull;
end;
procedure TReferenciasDataTableRules.SetID_EMPRESAIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ReferenciasID_EMPRESA].AsVariant := Null;
end;
function TReferenciasDataTableRules.GetCODIGOValue: String;
begin
result := DataTable.Fields[idx_ReferenciasCODIGO].AsString;
end;
procedure TReferenciasDataTableRules.SetCODIGOValue(const aValue: String);
begin
DataTable.Fields[idx_ReferenciasCODIGO].AsString := aValue;
end;
function TReferenciasDataTableRules.GetCODIGOIsNull: boolean;
begin
result := DataTable.Fields[idx_ReferenciasCODIGO].IsNull;
end;
procedure TReferenciasDataTableRules.SetCODIGOIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ReferenciasCODIGO].AsVariant := Null;
end;
function TReferenciasDataTableRules.GetVALORValue: String;
begin
result := DataTable.Fields[idx_ReferenciasVALOR].AsString;
end;
procedure TReferenciasDataTableRules.SetVALORValue(const aValue: String);
begin
DataTable.Fields[idx_ReferenciasVALOR].AsString := aValue;
end;
function TReferenciasDataTableRules.GetVALORIsNull: boolean;
begin
result := DataTable.Fields[idx_ReferenciasVALOR].IsNull;
end;
procedure TReferenciasDataTableRules.SetVALORIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ReferenciasVALOR].AsVariant := Null;
end;
function TReferenciasDataTableRules.GetDESCRIPCIONValue: String;
begin
result := DataTable.Fields[idx_ReferenciasDESCRIPCION].AsString;
end;
procedure TReferenciasDataTableRules.SetDESCRIPCIONValue(const aValue: String);
begin
DataTable.Fields[idx_ReferenciasDESCRIPCION].AsString := aValue;
end;
function TReferenciasDataTableRules.GetDESCRIPCIONIsNull: boolean;
begin
result := DataTable.Fields[idx_ReferenciasDESCRIPCION].IsNull;
end;
procedure TReferenciasDataTableRules.SetDESCRIPCIONIsNull(const aValue: Boolean);
begin
if aValue then
DataTable.Fields[idx_ReferenciasDESCRIPCION].AsVariant := Null;
end;
initialization
RegisterDataTableRules(RID_Referencias, TReferenciasDataTableRules);
end.