unit uBusinessUtils;

interface

uses
  uDAInterfaces, uDADataTable, uDABusinessProcessor;

function GetBusinessProcessorConnection (ABusinessProcessor: TDABusinessProcessor): IDAConnection;

implementation

uses
  DARemoteService_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 TDARemoteService) then
    Result := (ABusinessProcessor.Owner as TDARemoteService).Connection
  else
    Result := NIL;
end;


end.
