unit NewService_Impl; {----------------------------------------------------------------------------} { This unit was automatically generated by the RemObjects SDK after reading } { the RODL file associated with this project . } { } { This is where you are supposed to code the implementation of your objects. } {----------------------------------------------------------------------------} interface uses {vcl:} Classes, SysUtils, {RemObjects:} uROClientIntf, uROTypes, uROServer, uROServerIntf, uROSessions, {Ancestor Implementation:} DataAbstractService_Impl, {Used RODLs:} DataAbstract4_Intf, {Generated:} QuantumGrid4Library_Intf, uDAScriptingProvider, uDABusinessProcessor, uDAClasses, uDADataStreamer, uDABinAdapter; const { Dataset names for Schema } ds_Customers = 'Customers'; ds_Orders = 'Orders'; ds_AllOrders = 'AllOrders'; type { TNewService } TNewService = class(TDataAbstractService, INewService) BinAdapter: TDABinDataStreamer; bsCustomers: TDABusinessProcessor; bsOrders: TDABusinessProcessor; Schema: TDASchema; DataDictionary: TDADataDictionary; bsAllOrders: TDABusinessProcessor; private protected { INewService methods } function GetCustomers: Binary; function UpdateCustomers(const IncomingData: Binary): Binary; function GetOrders(const CustomerID: String): Binary; end; implementation {$R *.dfm} uses {Generated:} QuantumGrid4Library_Invk, QuantumGrid4_ServerData, uDAInterfaces; procedure Create_NewService(out anInstance : IUnknown); begin anInstance := TNewService.Create(NIL); end; { TNewService } function TNewService.GetCustomers: Binary; begin result := Binary.Create; BinAdapter.Initialize(result, aiWrite); BinAdapter.WriteDataset(Schema.NewDataset(Connection, ds_Customers), [woRows]); BinAdapter.Finalize; end; function TNewService.GetOrders(const CustomerID: String): Binary; begin result := Binary.Create; BinAdapter.Initialize(result, aiWrite); BinAdapter.WriteDataset(Schema.NewDataset(Connection, ds_Orders,['CustomerID'], [CustomerID]), [woRows]); BinAdapter.Finalize; end; function TNewService.UpdateCustomers(const IncomingData: Binary): Binary; begin result := UpdateData(IncomingData); end; initialization TROClassFactory.Create('NewService', Create_NewService, TNewService_Invoker); finalization end.