DARemoteDataAdapter Class

This is a Library topic for Data Abstract for Xcode
This page is generated from external data, please do not update
Protocols — Classes — Enums — Implements
Contents |
Overview
The DARemoteDataAdapter class serves as a mediator between DataAbstractService and your client side. DARemoteDataAdapter knows where service resides and how to connect to it. DARemoteDataAdapter performs login if a service requires it. DARemoteDataAdapter can prepare and execute any kind of requests supported by DataAbstractService. Requests can be both - synchronous and asynchronous.
Read more about the Remote Data Adapter at Remote Data Adapter and Data Tables (Xcode).
Below, you can find a simple sample of using DARemoteDataAdapter:
ROMessage *message = [[ROBinMessage alloc] init]; ROHTTPClientChannel *channel = [[ROHTTPClientChannel alloc] initWithTargetUrl:@"http://myserver:8099/bin"]; RORemoteService *dataService = [[RORemoteService alloc] initWithMessage:message channel:channel serviceName:@"DataService"]; RORemoteService *loginService = [[RORemoteService alloc] initWithMessage:message channel:channel serviceName:@"LoginService"]; DARemoteDataAdapter *adapter = [[DARemoteDataAdapter alloc] initWithDataService:dataService loginService:loginService]; [channel setDelegate:adapter]; // get table from the server DADataTable *table = [[adapter getDataTable:@"MyTable"] retain]; // perform some changes in table ... // apply changes on server [adapter applyChangesForTable:table];
Tasks
Creating DARemoteDataAdapter
- init
- initWithDataService:
- initWithDataService:loginService:
Login & LogOut
- loginWithUsername:password:
- loginWithUsername:password:connectionName:
- loginWithString:
- logout
Server calls
- getSchema
Getting data - synchronous
- getDataTable:
- getDataTable:select:where:
- getDataTables:
- getDataTables:select:where:
- getDataTableWithSQL:
- getDataTable:withSQL:
- getDataTables:withSQL:
Getting data - asynchronous
- beginGetDataTable:start:
- beginGetDataTable:select:where:start:
- beginGetDataTables:start:
- beginGetDataTables:select:where:start:
- beginGetDataTableWithSQL:start:
- beginGetDataTable:withSQL:start:
- beginGetDataTables:withSQL:start:
Applying changes - synchronous
- applyChangesForTable:
- applyChangesForTables:
Applying changes - asynchronous
- beginApplyChangesForTable:
- beginApplyChangesForTable:start:
- beginApplyChangesForTables:
- beginApplyChangesForTables:start
Location
DataAbstract/DARemoteDataAdapter.h
- Ancestry: DADataAdapter | DARemoteDataAdapter | Descendants
Implemented interfaces
Properties
| dataService nonatomic retain |
|---|
|
Reference to a data service.
|
| dataStreamer retain |
|
Reference to data streamer. Currently we support DABin2DataStreamer only.
|
| delegate assign |
|
A delegate that wants to receive notifications of events that happen within the DARemoteDataAdapter, such as receiving a request to login, or any kind of failure.
|
| loginService nonatomic retain |
|
Reference to the login service. Optionally, it can be nil if authentication is not required.
|
| loginString copy nonatomic |
|
|
| password copy nonatomic |
|
|
| username copy nonatomic |
|
|
Class Methods
| adapterWithTargetUrl: (NSString *): id deprecated |
|---|
|
|
| adapterWithTargetURL: (NSURL *): id |
|
|
| adapterWithTargetURL:dataServiceName: |
|
|
| adapterWithTargetURL:dataServiceName:loginServiceName: |
|
|
Instance Methods
| applyChangesForTable: |
|---|
|
This method applies changes for the given table synchronously. It extracts a delta from the table, composes and executes the UpdateData method of the DataAbstract service. If there are no changes, the method does nothing. Finally, it processes the incoming delta (if it is returned from the server) and merges changes with the table data. If some of changes failed on the server side, a DAException with the appropriate message will be raised.
|
| applyChangesForTables: |
|
This method applies changes for the given tables synchronously. It extracts a delta from the table, composes and executes the UpdateData method of the DataAbstract service. If there are no changes, the method does nothing. Finally, it process the incoming delta (if it is returned from the server) and merges changes with the table data. If some of changes failed on the server side, a DAException with the appropriate message will be raised.
|
| beginApplyChangesForTable: |
|
This method creates and returns an asynchronous request for applying changes for the given table.
|
| beginApplyChangesForTable:start: |
|
This method creates and returns an asynchronous request for applying changes for the given table. It has an additional boolean parameter start that specifies whether the request will be started or not. This allows you to control when to start the execution request.
|
| beginApplyChangesForTables: |
|
This method creates and returns an asynchronous request for applying changes for the given tables.
|
| beginApplyChangesForTables:start: |
|
This method creates and returns an asynchronous request for applying changes for the given tables. Using the start parameter, you can specify whether the asynchronous request will be started when the method ends or not.
|
| beginExecuteCommand:withParameters:start: |
|
|
| beginExecuteCommand:withParameters:withBlock: |
|
|
| beginExecuteCommandEx:withParameters:start: |
|
|
| beginExecuteCommandEx:withParameters:withBlock: |
|
|
| beginGetDataTable:select:where:start: |
|
This method creates and returns an asynchronous request for obtaining a DADataTable with the given name and with a glance of the given DynamicSelect fields and DynamicWhere clauses, asynchronously.
|
| beginGetDataTable:select:where:withBlock: |
|
|
| beginGetDataTable:start: |
|
This method creates an asynchronous request for obtaining a DADataTable with the given name.
|
| beginGetDataTable:withBlock: |
|
|
| beginGetDataTable:withSQL:start: |
|
This method creates an asynchronous request for obtaining a DADataTable with the given name according to the specified DASQL SELECT statement asynchronously.
|
| beginGetDataTable:withSQL:withBlock: |
|
|
| beginGetDataTables:select:where:start: |
|
This method creates an asynchronous request for obtaining an array of DADataTables with the given names with a glance of the given DynamicSelect fields and DynamicWhere clause.
|
| beginGetDataTables:select:where:withBlock: |
|
|
| beginGetDataTables:start: |
|
This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names.
|
| beginGetDataTables:withBlock: |
|
|
| beginGetDataTables:withSQL:start: |
|
This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names and given DASQL SELECT statements.
|
| beginGetDataTables:withSQL:withBlock: |
|
|
| beginGetDataTableWithSQL:start: |
|
This method creates and returns an asynchronous request for obtaining a DADataTable with the given DASQL SELECT statement. The table will have the default name "data".
|
| beginGetDataTableWithSQL:withBlock: |
|
|
| beginGetSchema |
|
|
| beginGetSchemaWithBlock: |
|
|
| executeCommand:withParameters: |
|
|
| executeCommand:withParameterValuesAndNames: |
|
|
| executeCommandEx:withParameters:outputParameters: |
|
|
| getDataTable: |
|
This method returns the table with the given name synchronously.
|
| getDataTable:select:where: |
|
This method returns the table with the given name and with a glance of the given DynamicSelect fields and DynamicWhere clause synchronously.
|
| getDataTable:withSQL: |
|
Returns the table with the given name according to the given DASQL SELECT statement.
|
| getDataTables: |
|
This method returns an array of tables according to the given table names.
|
| getDataTables:select:where: |
|
This method returns an array of tables with the given names and with a glance of the given DynamicSelect fields and DynamicWhere clause synchronously.
|
| getDataTables:withSQL: |
|
This method returns an array of tables with the given names and according to the given DASQL SELECT statements.
|
| getDataTableWithSQL: |
|
This method returns the table with the given DASQL SELECT statement.
|
| getSchema |
|
This method returns a DASchema for the Data Abstract service.
|
| init |
|
Returns an initialized instance of the DARemoteDataAdapter.
|
| initWithDataService: |
|
Returns an instance of the DARemoteDataAdapter initialized with the given service.
|
| initWithDataService:loginService: |
|
Returns an instance of the DARemoteDataAdapter initialized with the given data and login services.
|
| initWithTargetUrl: (NSString *): id deprecated |
|
|
| initWithTargetURL: (NSURL *): id |
|
|
| initWithTargetURL:dataServiceName: |
|
|
| initWithTargetURL:dataServiceName:loginServiceName: |
|
|
| login |
|
|
| loginWithString: |
|
This methods tries to login with the given connection string. It invokes the LoginEx method of the BaseLoginService of the DataAbstract server.
|
| loginWithUsername:password: |
|
This methods tries to login with the given user name and password.
|
| loginWithUsername:password:connectionName: |
|
This methods tries to login with the given user name, password and connection name. Used for cases when the server side service has multiple connections.
|
| logout |
|
This method performs the log out.
|
Descendants
See Also
- Lists
- Data Abstract for Xcode: Protocols — Classes — Enums — Implements
- RemObjects SDK for Xcode: Protocols — Classes — Enums — Aliases — Implements
- Data Abstract shared: Data Types – File Types
- other editions:
- Data Abstract for .NET: Namespaces — Interfaces — Classes — Enums — Implements
- Data Abstract for Delphi: Interfaces — Classes — Enums — Aliases — Implements
- Data Abstract for Java: Namespaces — Interfaces — Classes — Enums — Implements
- Data Abstract for JavaScript: Objects
- Data Abstract for Xcode: Protocols — Classes — Enums — Implements

Product: RemObjects Data Abstract
Available Editions: Data Abstract for .NET, Delphi and Xcode