unit uBusinessUtils;

interface

uses
  uDAInterfaces, uDADataTable, uDABusinessProcessor;

function GetBusinessProcessorConnection (ABusinessProcessor: TDABusinessProcessor): IDAConnection;

implementation

uses
  DataAbstractService_Impl;

{ Se utiliza en las reglas de negocio del servidor y
  devuelve la conexión utilizada por el BusinessProcessor para
  procesar los deltas. }
function GetBusinessProcessorConnection (ABusinessProcessor: TDABusinessProcessor): IDAConnection;
begin
  if (ABusinessProcessor.Owner is TDataAbstractService) then
    Result := (ABusinessProcessor.Owner as TDataAbstractService).Connection
  else
    Result := NIL;
end;


end.
