DARemoteDataAdapter

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

*adapterWithTargetURL: *adapterWithTargetURL:dataServiceName:
*adapterWithTargetURL:dataServiceName:loginServiceName:

*initWithTargetURL: *initWithTargetURL:dataServiceName:
*initWithTargetURL:dataServiceName:loginServiceName:

Login & LogOut

*loginWithUsername:password: *loginWithUsername:password:connectionName: *loginWithString: *logout

Server calls

*getSchema *beginGetSchema *beginGetSchemaWithBlock:

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: *beginGetDataTable:select:where:withBlock: *beginGetDataTables:start: *beginGetDataTables:select:where:start: *beginGetDataTables:select:where:withBlock:

*beginGetDataTableWithSQL:start: *beginGetDataTableWithSQL:withBlock: *beginGetDataTable:withSQL:start: *beginGetDataTable:withSQL:withBlock: *beginGetDataTables:withSQL:start: *beginGetDataTables:withSQL:withBlock:

Applying changes - synchronous

*applyChangesForTable: *applyChangesForTables:

Applying changes - asynchronous

*beginApplyChangesForTable: *beginApplyChangesForTable:start: *beginApplyChangesForTables: *beginApplyChangesForTables:start

Executing Schema Commands - synchronous

*executeCommand:withParameters:
*executeCommand:withParameterValuesAndNames:
*executeCommandEx:withParameters:outputParameters:

Executing Schema Commands - asynchronous

*beginExecuteCommand:withParameters:start:
*beginExecuteCommand:withParameters:withBlock:
*beginExecuteCommandEx:withParameters:start:
*beginExecuteCommandEx:withParameters:withBlock:

Location

 

adapterWithTargetUrl:  deprecated

Allocates and initializes DARemoteDataAdapter by given target URL string. Deprecated, please use adapterWithTargertURL method instead

+ (id) adapterWithTargetUrl:(NSString *)url

Parameters:

  • url: URL as string

adapterWithTargetURL:

Allocates and initializes DARemoteDataAdapter instance by given target URL.

+ (id) adapterWithTargetURL:(NSURL *)url

Parameters:

  • url: Target URL of the service we want to connect to.

adapterWithTargetURL:dataServiceName:

Allocates and initializes DARemoteDataAdapter instance by given target URL and custom data service name (DataService- is the default name).

+ (id) adapterWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. DataService is the default name.

adapterWithTargetURL:dataServiceName:loginServiceName:

Allocates and initializes DARemoteDataAdapter instance by given target URL and custom login & data service names

+ (id) adapterWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName loginServiceName:(NSString *)loginServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. "DataService" - is the default name.
  • loginServiceName: Name of the login service. "LoginService" - is the default name.

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.

- (void) applyChangesForTable:(DADataTable *)dataTable

Parameters:

  • dataTable: reference to DADataTable instance with changes we want to apply.

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.

- (void) applyChangesForTables:(NSArray *)dataTables

Parameters:

  • dataTables: array of DADataTables instances with changes we want to apply.

beginApplyChangesForTable:

This method creates and returns an asynchronous request for applying changes for the given table.

- (DAAsyncRequest *) beginApplyChangesForTable:(DADataTable *)dataTable

Parameters:

  • dataTable: Reference to DADataTable instance with changes we want to apply.

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.

- (DAAsyncRequest *) beginApplyChangesForTable:(DADataTable *)dataTable start:(BOOL)start

Parameters:

  • dataTable: Reference to the DADataTable instance with changes you want to apply.
  • start: Boolean flag that specifies whether the request willbe started when this method ends or not.

beginApplyChangesForTable:withBlock:

This method creates, run and returns an asynchronous request for applying changes for the given table. It allows to provide your completion block of code which will be executed after asynchronous request completes.

- (DAAsyncRequest *) beginApplyChangesForTable:(DADataTable *)dataTable withBlock:(void^)block

Parameters:

  • dataTable: Reference to the DADataTable instance with changes you want to apply.
  • block: The handler block to execute.

beginApplyChangesForTables:

This method creates and returns an asynchronous request for applying changes for the given tables.

- (DAAsyncRequest *) beginApplyChangesForTables:(NSArray *)dataTables

Parameters:

  • dataTables: array of DADataTable instances with changes we want to apply.

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.

- (DAAsyncRequest *) beginApplyChangesForTables:(NSArray *)dataTables start:(BOOL)start

Parameters:

  • dataTables: array of DADataTables instances with changes we want to apply.
  • start: boolean flag that specifies, will be request started when this method ends or not.

beginApplyChangesForTables:withBlock:

This method creates, run and returns an asynchronous request for applying changes for the given tables. It allows to provide your completion block of code which will be executed after asynchronous request completes.

- (DAAsyncRequest *) beginApplyChangesForTables:(NSArray *)dataTables withBlock:(void^)block

Parameters:

  • dataTables: Array of the DADataTable instances with changes you want to apply.
  • block: The handler block to execute.

beginExecuteCommand:withParameters:start:

This method creates and returns an asynchronous request for executing a Schema Command with the given name and parameters

- (DAAsyncRequest *) beginExecuteCommand:(NSString *)commandName withParameters:(NSDictionary *)params start:(BOOL)start

Parameters:

  • commandName: Name of the Schema Command
  • params: Dictionary of the command parameters
  • start: boolean flag that specifies, will be request started immediately or not.

beginExecuteCommand:withParameters:withBlock:

This method creates and returns an asynchronous request for executing a Schema Command with the given name and parameters. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginExecuteCommand:(NSString *)commandName withParameters:(NSDictionary *)params withBlock:(void(^)(int, NSDictionary *))block

Parameters:

  • commandName: Name of the Schema Command to execute
  • params: Dictionary of the command parameters
  • block: The handler block to execute.

beginExecuteCommandEx:withParameters:start:

This method creates and returns an asynchronous request for extended executing a Schema Command (ExecuteCommandEx) with the given name and parameters.

- (DAAsyncRequest *) beginExecuteCommandEx:(NSString *)commandName withParameters:(NSDictionary *)params start:(BOOL)start

Parameters:

  • commandName: Name of the Schema Command
  • params: Dictionary of the command parameters
  • start: boolean flag that specifies, will be request started immediately or not.

beginExecuteCommandEx:withParameters:withBlock:

This method creates and returns an asynchronous request for extended executing a Schema Command (ExecuteCommandEx) with the given name and parameters It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginExecuteCommandEx:(NSString *)commandName withParameters:(NSDictionary *)params withBlock:(void(^)(int, NSDictionary *))block

Parameters:

  • commandName: Name of the Schema Command
  • params: Dictionary of the command parameters
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName select:(NSArray *)fieldList where:(DADynamicWhereClause *)whereClause start:(BOOL)start

Parameters:

  • tableName: The table name for which you want to get data.
  • fieldList: The array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClause: A dynamic where clause.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTable:select:where:withBlock:

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. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName select:(NSArray *)fieldList where:(DADynamicWhereClause *)whereClause withBlock:(void(^)(DADataTable *))block

Parameters:

  • tableName: name of the data tables
  • fieldList: The array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClause: A dynamic where clause.
  • block: The handler block to execute.

beginGetDataTable:start:

This method creates an asynchronous request for obtaining a DADataTable with the given name.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName start:(BOOL)start

Parameters:

  • tableName: table name for which we want to get data.
  • start: boolean flag that specifies, will be request started at the end of this method or not.

beginGetDataTable:withBlock:

This method creates an asynchronous request for obtaining a DADataTable with the given name. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName withBlock:(void(^)(DADataTable *))block

Parameters:

  • tableName: table name for which we want to get data.
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName withSQL:(NSString *)sql start:(BOOL)start

Parameters:

  • tableName: The table name for which you want to get data.
  • sql: A DASQL SELECT statement.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTable:withSQL:withBlock:

This method creates an asynchronous request for obtaining a DADataTable with the given name according to the specified DASQL SELECT statement asynchronously. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName withSQL:(NSString *)sql withBlock:(void(^)(DADataTable *))block

Parameters:

  • tableName: The table name for which you want to get data.
  • sql: A DASQL SELECT statement.
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames select:(NSArray *)fieldLists where:(NSArray *)whereClauses start:(BOOL)start

Parameters:

  • tableNames: array of the table names we want to obtain.
  • fieldLists: array of array of the fields we want to obtain for each table.
  • whereClauses: array of DynamicWhere clauses for each of table.
  • start: boolean flag that specifies, will be request started at the end of this method or not.

beginGetDataTables:select:where:withBlock:

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. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames select:(NSArray *)fieldLists where:(NSArray *)whereClauses withBlock:(void(^)(NSDictionary *))block

Parameters:

  • tableNames: array of the table names we want to obtain.
  • fieldLists: array of array of the fields we want to obtain for each table.
  • whereClauses: array of DynamicWhere clauses for each of table.
  • block: The handler block to execute.

beginGetDataTables:start:

This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames start:(BOOL)start

Parameters:

  • tableNames: The array of table names you want to obtain.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTables:withBlock:

This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames withBlock:(void(^)(NSDictionary *))block

Parameters:

  • tableNames: The array of table names you want to obtain.
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames withSQL:(NSArray *)sqlQueries start:(BOOL)start

Parameters:

  • tableNames: The array of the table names you want to obtain.
  • sqlQueries: DASQL SELECT statements.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTables:withSQL:withBlock:

This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names and given DASQL SELECT statements. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames withSQL:(NSArray *)sqlQueries withBlock:(void(^)(NSDictionary *))block

Parameters:

  • tableNames: The array of the table names you want to obtain.
  • sqlQueries: DASQL SELECT statements.
  • block: The handler block to execute.

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".

- (DAAsyncRequest *) beginGetDataTableWithSQL:(NSString *)sql start:(BOOL)start

Parameters:

  • sql: DASQL SELECT statement.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTableWithSQL:withBlock:

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". It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTableWithSQL:(NSString *)sql withBlock:(void(^)(DADataTable *))block

Parameters:

  • sql: DASQL SELECT statement.
  • block: The handler block to execute.

beginGetSchema

This method creates and returns an asynchronous request for obtaining a DASchema instance.

- (DAAsyncRequest *) beginGetSchema

beginGetSchemaWithBlock:

This method creates and returns an asynchronous request for obtaining a DASchema instance. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetSchemaWithBlock:(void(^)(DASchema *))block

Parameters:

  • block: The handler block to execute.

dataService  nonatomic retain

Reference to a data service.

@property (nonatomic, retain) RORemoteService *dataService

dataStreamer  retain

Reference to data streamer. Currently we support DABin2DataStreamer only.

@property (retain) DADataStreamer *dataStreamer

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.

@property (assign) id<DARemoteDataAdapterDelegate> delegate

executeCommand:withParameters:

This method executes Schema Command call with the given name and parameters

- (int) executeCommand:(NSString *)commandName withParameters:(NSDictionary *)params

Parameters:

  • commandName: Name of the Schema Command to execute
  • params: Dictionary of the command parameters

executeCommand:withParameterValuesAndNames:

This method executes extended Schema Command call (ExecuteCommandEx) with the given name and parameters values and names

- (int) executeCommand:(NSString *)commandName withParameterValuesAndNames:(id)value , ... NS_REQUIRES_NIL_TERMINATION

Parameters:

  • commandName: Name of the Schema Command to execute
  • value: The first value of command parameters.

executeCommandEx:withParameters:outputParameters:

This method executes extended Schema Command call (ExecuteCommandEx) with the given name and input/output parameters

- (int) executeCommandEx:(NSString *)commandName withParameters:(NSDictionary *)params outputParameters:(NSDictionary **)outParams

Parameters:

  • commandName: Name of the Schema Command to execute
  • params: Dictionary of the command parameters
  • outParams: Dictionary of the command output parameters

getDataTable:

This method returns the table with the given name synchronously.

- (DADataTable *) getDataTable:(NSString *)tableName

Parameters:

  • tableName: The table name you want to obtain.

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.

- (DADataTable *) getDataTable:(NSString *)tableName select:(NSArray *)fieldList where:(DADynamicWhereClause *)whereClause

Parameters:

  • tableName: The table name for which you want to get data.
  • fieldList: An array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClause: A dynamic where clause.

getDataTable:withSQL:

Returns the table with the given name according to the given DASQL SELECT statement.

- (DADataTable *) getDataTable:(NSString *)tableName withSQL:(NSString *)sql

Parameters:

  • tableName: Name of the returned table.
  • sql: DASQL SELECT statement.

getDataTables:

This method returns an array of tables according to the given table names.

- (NSDictionary *) getDataTables:(NSArray *)tableNames

Parameters:

  • tableNames: An array of the table names you want to obtain.

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.

- (NSDictionary *) getDataTables:(NSArray *)tableNames select:(NSArray *)fieldLists where:(NSArray *)whereClauses

Parameters:

  • tableNames: The array of table names for which you want to get data.
  • fieldLists: An array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClauses: An array of dynamic where clause.

getDataTables:withSQL:

This method returns an array of tables with the given names and according to the given DASQL SELECT statements.

- (NSDictionary *) getDataTables:(NSArray *)tableNames withSQL:(NSArray *)sqlQueries

Parameters:

  • tableNames: The array of table names you want to obtain.
  • sqlQueries: DASQL SELECT statements.

getDataTableWithSQL:

This method returns the table with the given DASQL SELECT statement.

- (DADataTable *) getDataTableWithSQL:(NSString *)sql

Parameters:

  • sql: DASQL SELECT statement.

getSchema

This method returns a DASchema for the Data Abstract service.

- (DASchema *) getSchema

init

Returns an initialized instance of the DARemoteDataAdapter.

- (id) init

initWithDataService:

Returns an instance of the DARemoteDataAdapter initialized with the given service.

- (id) initWithDataService:(RORemoteService *)dataService

Parameters:

  • dataService: Reference to the service that provides data.

initWithDataService:loginService:

Returns an instance of the DARemoteDataAdapter initialized with the given data and login services.

- (id) initWithDataService:(RORemoteService *)dataService loginService:(RORemoteService *)loginService

Parameters:

  • dataService: Reference to the data service.
  • loginService: Reference to the login service.

initWithTargetUrl:  deprecated

Initializes DARemoteDataAdapter by given target URL string. Deprecated, please use initWithTargertURL method instead

- (id) initWithTargetUrl:(NSString *)url

Parameters:

  • url: URL as string

initWithTargetURL:

Initializes DARemoteDataAdapter instance by given target URL.

- (id) initWithTargetURL:(NSURL *)url

Parameters:

  • url: Target URL of the service we want to connect to.

initWithTargetURL:dataServiceName:

Initializes DARemoteDataAdapter instance by given target URL and custom data service name (DataService- is the default name).

- (id) initWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. "DataService" - is the default name.

initWithTargetURL:dataServiceName:loginServiceName:

Initializes DARemoteDataAdapter instance by given target URL and custom login & data service names

- (id) initWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName loginServiceName:(NSString *)loginServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. "DataService" - is the default name.
  • loginServiceName: Name of the login service. "LoginService" - is the default name.

login

Method that performs login to secured server. For login it uses or loginString value or username and password properties.

- (BOOL) login

loginService  nonatomic retain

Reference to the login service. Optionally, it can be nil if authentication is not required.

@property (nonatomic, retain) RORemoteService *loginService

loginString  copy nonatomic

a preformatted LoginEx string.

@property (copy, nonatomic) NSString *loginString

loginWithString:

This methods tries to login with the given connection string. It invokes the LoginEx method of the BaseLoginService of the DataAbstract server.

- (BOOL) loginWithString:(NSString *)aConnectionString

Parameters:

  • aConnectionString: Connection string.

loginWithUsername:password:

This methods tries to login with the given user name and password.

- (BOOL) loginWithUsername:(NSString *)userName password:(NSString *)password

Parameters:

  • userName: Login
  • password: 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.

- (BOOL) loginWithUsername:(NSString *)userName password:(NSString *)password connectionName:(NSString *)connectionName

Parameters:

  • userName: Login
  • password: Password
  • connectionName: Connection name

logout

This method performs the log out.

- (void) logout

password  copy nonatomic

Password value for login to secured server.

@property (copy, nonatomic) NSString *password

username  copy nonatomic

User name for login to secured server

@property (copy, nonatomic) NSString *username

 

dataService  nonatomic retain

Reference to a data service.

@property (nonatomic, retain) RORemoteService *dataService

dataStreamer  retain

Reference to data streamer. Currently we support DABin2DataStreamer only.

@property (retain) DADataStreamer *dataStreamer

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.

@property (assign) id<DARemoteDataAdapterDelegate> delegate

loginService  nonatomic retain

Reference to the login service. Optionally, it can be nil if authentication is not required.

@property (nonatomic, retain) RORemoteService *loginService

loginString  copy nonatomic

a preformatted LoginEx string.

@property (copy, nonatomic) NSString *loginString

password  copy nonatomic

Password value for login to secured server.

@property (copy, nonatomic) NSString *password

username  copy nonatomic

User name for login to secured server

@property (copy, nonatomic) NSString *username

 

adapterWithTargetUrl:  deprecated

Allocates and initializes DARemoteDataAdapter by given target URL string. Deprecated, please use adapterWithTargertURL method instead

+ (id) adapterWithTargetUrl:(NSString *)url

Parameters:

  • url: URL as string

adapterWithTargetURL:

Allocates and initializes DARemoteDataAdapter instance by given target URL.

+ (id) adapterWithTargetURL:(NSURL *)url

Parameters:

  • url: Target URL of the service we want to connect to.

adapterWithTargetURL:dataServiceName:

Allocates and initializes DARemoteDataAdapter instance by given target URL and custom data service name (DataService- is the default name).

+ (id) adapterWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. DataService is the default name.

adapterWithTargetURL:dataServiceName:loginServiceName:

Allocates and initializes DARemoteDataAdapter instance by given target URL and custom login & data service names

+ (id) adapterWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName loginServiceName:(NSString *)loginServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. "DataService" - is the default name.
  • loginServiceName: Name of the login service. "LoginService" - is the default name.

 

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.

- (void) applyChangesForTable:(DADataTable *)dataTable

Parameters:

  • dataTable: reference to DADataTable instance with changes we want to apply.

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.

- (void) applyChangesForTables:(NSArray *)dataTables

Parameters:

  • dataTables: array of DADataTables instances with changes we want to apply.

beginApplyChangesForTable:

This method creates and returns an asynchronous request for applying changes for the given table.

- (DAAsyncRequest *) beginApplyChangesForTable:(DADataTable *)dataTable

Parameters:

  • dataTable: Reference to DADataTable instance with changes we want to apply.

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.

- (DAAsyncRequest *) beginApplyChangesForTable:(DADataTable *)dataTable start:(BOOL)start

Parameters:

  • dataTable: Reference to the DADataTable instance with changes you want to apply.
  • start: Boolean flag that specifies whether the request willbe started when this method ends or not.

beginApplyChangesForTable:withBlock:

This method creates, run and returns an asynchronous request for applying changes for the given table. It allows to provide your completion block of code which will be executed after asynchronous request completes.

- (DAAsyncRequest *) beginApplyChangesForTable:(DADataTable *)dataTable withBlock:(void^)block

Parameters:

  • dataTable: Reference to the DADataTable instance with changes you want to apply.
  • block: The handler block to execute.

beginApplyChangesForTables:

This method creates and returns an asynchronous request for applying changes for the given tables.

- (DAAsyncRequest *) beginApplyChangesForTables:(NSArray *)dataTables

Parameters:

  • dataTables: array of DADataTable instances with changes we want to apply.

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.

- (DAAsyncRequest *) beginApplyChangesForTables:(NSArray *)dataTables start:(BOOL)start

Parameters:

  • dataTables: array of DADataTables instances with changes we want to apply.
  • start: boolean flag that specifies, will be request started when this method ends or not.

beginApplyChangesForTables:withBlock:

This method creates, run and returns an asynchronous request for applying changes for the given tables. It allows to provide your completion block of code which will be executed after asynchronous request completes.

- (DAAsyncRequest *) beginApplyChangesForTables:(NSArray *)dataTables withBlock:(void^)block

Parameters:

  • dataTables: Array of the DADataTable instances with changes you want to apply.
  • block: The handler block to execute.

beginExecuteCommand:withParameters:start:

This method creates and returns an asynchronous request for executing a Schema Command with the given name and parameters

- (DAAsyncRequest *) beginExecuteCommand:(NSString *)commandName withParameters:(NSDictionary *)params start:(BOOL)start

Parameters:

  • commandName: Name of the Schema Command
  • params: Dictionary of the command parameters
  • start: boolean flag that specifies, will be request started immediately or not.

beginExecuteCommand:withParameters:withBlock:

This method creates and returns an asynchronous request for executing a Schema Command with the given name and parameters. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginExecuteCommand:(NSString *)commandName withParameters:(NSDictionary *)params withBlock:(void(^)(int, NSDictionary *))block

Parameters:

  • commandName: Name of the Schema Command to execute
  • params: Dictionary of the command parameters
  • block: The handler block to execute.

beginExecuteCommandEx:withParameters:start:

This method creates and returns an asynchronous request for extended executing a Schema Command (ExecuteCommandEx) with the given name and parameters.

- (DAAsyncRequest *) beginExecuteCommandEx:(NSString *)commandName withParameters:(NSDictionary *)params start:(BOOL)start

Parameters:

  • commandName: Name of the Schema Command
  • params: Dictionary of the command parameters
  • start: boolean flag that specifies, will be request started immediately or not.

beginExecuteCommandEx:withParameters:withBlock:

This method creates and returns an asynchronous request for extended executing a Schema Command (ExecuteCommandEx) with the given name and parameters It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginExecuteCommandEx:(NSString *)commandName withParameters:(NSDictionary *)params withBlock:(void(^)(int, NSDictionary *))block

Parameters:

  • commandName: Name of the Schema Command
  • params: Dictionary of the command parameters
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName select:(NSArray *)fieldList where:(DADynamicWhereClause *)whereClause start:(BOOL)start

Parameters:

  • tableName: The table name for which you want to get data.
  • fieldList: The array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClause: A dynamic where clause.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTable:select:where:withBlock:

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. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName select:(NSArray *)fieldList where:(DADynamicWhereClause *)whereClause withBlock:(void(^)(DADataTable *))block

Parameters:

  • tableName: name of the data tables
  • fieldList: The array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClause: A dynamic where clause.
  • block: The handler block to execute.

beginGetDataTable:start:

This method creates an asynchronous request for obtaining a DADataTable with the given name.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName start:(BOOL)start

Parameters:

  • tableName: table name for which we want to get data.
  • start: boolean flag that specifies, will be request started at the end of this method or not.

beginGetDataTable:withBlock:

This method creates an asynchronous request for obtaining a DADataTable with the given name. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName withBlock:(void(^)(DADataTable *))block

Parameters:

  • tableName: table name for which we want to get data.
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName withSQL:(NSString *)sql start:(BOOL)start

Parameters:

  • tableName: The table name for which you want to get data.
  • sql: A DASQL SELECT statement.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTable:withSQL:withBlock:

This method creates an asynchronous request for obtaining a DADataTable with the given name according to the specified DASQL SELECT statement asynchronously. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTable:(NSString *)tableName withSQL:(NSString *)sql withBlock:(void(^)(DADataTable *))block

Parameters:

  • tableName: The table name for which you want to get data.
  • sql: A DASQL SELECT statement.
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames select:(NSArray *)fieldLists where:(NSArray *)whereClauses start:(BOOL)start

Parameters:

  • tableNames: array of the table names we want to obtain.
  • fieldLists: array of array of the fields we want to obtain for each table.
  • whereClauses: array of DynamicWhere clauses for each of table.
  • start: boolean flag that specifies, will be request started at the end of this method or not.

beginGetDataTables:select:where:withBlock:

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. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames select:(NSArray *)fieldLists where:(NSArray *)whereClauses withBlock:(void(^)(NSDictionary *))block

Parameters:

  • tableNames: array of the table names we want to obtain.
  • fieldLists: array of array of the fields we want to obtain for each table.
  • whereClauses: array of DynamicWhere clauses for each of table.
  • block: The handler block to execute.

beginGetDataTables:start:

This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames start:(BOOL)start

Parameters:

  • tableNames: The array of table names you want to obtain.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTables:withBlock:

This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames withBlock:(void(^)(NSDictionary *))block

Parameters:

  • tableNames: The array of table names you want to obtain.
  • block: The handler block to execute.

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.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames withSQL:(NSArray *)sqlQueries start:(BOOL)start

Parameters:

  • tableNames: The array of the table names you want to obtain.
  • sqlQueries: DASQL SELECT statements.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTables:withSQL:withBlock:

This method creates and returns an asynchronous request for obtaining an array of DADataTables with the given names and given DASQL SELECT statements. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTables:(NSArray *)tableNames withSQL:(NSArray *)sqlQueries withBlock:(void(^)(NSDictionary *))block

Parameters:

  • tableNames: The array of the table names you want to obtain.
  • sqlQueries: DASQL SELECT statements.
  • block: The handler block to execute.

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".

- (DAAsyncRequest *) beginGetDataTableWithSQL:(NSString *)sql start:(BOOL)start

Parameters:

  • sql: DASQL SELECT statement.
  • start: A boolean flag that specifies whether the request will be started at the end of this method or not.

beginGetDataTableWithSQL:withBlock:

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". It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetDataTableWithSQL:(NSString *)sql withBlock:(void(^)(DADataTable *))block

Parameters:

  • sql: DASQL SELECT statement.
  • block: The handler block to execute.

beginGetSchema

This method creates and returns an asynchronous request for obtaining a DASchema instance.

- (DAAsyncRequest *) beginGetSchema

beginGetSchemaWithBlock:

This method creates and returns an asynchronous request for obtaining a DASchema instance. It also takes a block of code that will be executed when the async request completes.

- (DAAsyncRequest *) beginGetSchemaWithBlock:(void(^)(DASchema *))block

Parameters:

  • block: The handler block to execute.

executeCommand:withParameters:

This method executes Schema Command call with the given name and parameters

- (int) executeCommand:(NSString *)commandName withParameters:(NSDictionary *)params

Parameters:

  • commandName: Name of the Schema Command to execute
  • params: Dictionary of the command parameters

executeCommand:withParameterValuesAndNames:

This method executes extended Schema Command call (ExecuteCommandEx) with the given name and parameters values and names

- (int) executeCommand:(NSString *)commandName withParameterValuesAndNames:(id)value , ... NS_REQUIRES_NIL_TERMINATION

Parameters:

  • commandName: Name of the Schema Command to execute
  • value: The first value of command parameters.

executeCommandEx:withParameters:outputParameters:

This method executes extended Schema Command call (ExecuteCommandEx) with the given name and input/output parameters

- (int) executeCommandEx:(NSString *)commandName withParameters:(NSDictionary *)params outputParameters:(NSDictionary **)outParams

Parameters:

  • commandName: Name of the Schema Command to execute
  • params: Dictionary of the command parameters
  • outParams: Dictionary of the command output parameters

getDataTable:

This method returns the table with the given name synchronously.

- (DADataTable *) getDataTable:(NSString *)tableName

Parameters:

  • tableName: The table name you want to obtain.

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.

- (DADataTable *) getDataTable:(NSString *)tableName select:(NSArray *)fieldList where:(DADynamicWhereClause *)whereClause

Parameters:

  • tableName: The table name for which you want to get data.
  • fieldList: An array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClause: A dynamic where clause.

getDataTable:withSQL:

Returns the table with the given name according to the given DASQL SELECT statement.

- (DADataTable *) getDataTable:(NSString *)tableName withSQL:(NSString *)sql

Parameters:

  • tableName: Name of the returned table.
  • sql: DASQL SELECT statement.

getDataTables:

This method returns an array of tables according to the given table names.

- (NSDictionary *) getDataTables:(NSArray *)tableNames

Parameters:

  • tableNames: An array of the table names you want to obtain.

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.

- (NSDictionary *) getDataTables:(NSArray *)tableNames select:(NSArray *)fieldLists where:(NSArray *)whereClauses

Parameters:

  • tableNames: The array of table names for which you want to get data.
  • fieldLists: An array of field names for which you want to get data (DA DynamicSelect feature).
  • whereClauses: An array of dynamic where clause.

getDataTables:withSQL:

This method returns an array of tables with the given names and according to the given DASQL SELECT statements.

- (NSDictionary *) getDataTables:(NSArray *)tableNames withSQL:(NSArray *)sqlQueries

Parameters:

  • tableNames: The array of table names you want to obtain.
  • sqlQueries: DASQL SELECT statements.

getDataTableWithSQL:

This method returns the table with the given DASQL SELECT statement.

- (DADataTable *) getDataTableWithSQL:(NSString *)sql

Parameters:

  • sql: DASQL SELECT statement.

getSchema

This method returns a DASchema for the Data Abstract service.

- (DASchema *) getSchema

init

Returns an initialized instance of the DARemoteDataAdapter.

- (id) init

initWithDataService:

Returns an instance of the DARemoteDataAdapter initialized with the given service.

- (id) initWithDataService:(RORemoteService *)dataService

Parameters:

  • dataService: Reference to the service that provides data.

initWithDataService:loginService:

Returns an instance of the DARemoteDataAdapter initialized with the given data and login services.

- (id) initWithDataService:(RORemoteService *)dataService loginService:(RORemoteService *)loginService

Parameters:

  • dataService: Reference to the data service.
  • loginService: Reference to the login service.

initWithTargetUrl:  deprecated

Initializes DARemoteDataAdapter by given target URL string. Deprecated, please use initWithTargertURL method instead

- (id) initWithTargetUrl:(NSString *)url

Parameters:

  • url: URL as string

initWithTargetURL:

Initializes DARemoteDataAdapter instance by given target URL.

- (id) initWithTargetURL:(NSURL *)url

Parameters:

  • url: Target URL of the service we want to connect to.

initWithTargetURL:dataServiceName:

Initializes DARemoteDataAdapter instance by given target URL and custom data service name (DataService- is the default name).

- (id) initWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. "DataService" - is the default name.

initWithTargetURL:dataServiceName:loginServiceName:

Initializes DARemoteDataAdapter instance by given target URL and custom login & data service names

- (id) initWithTargetURL:(NSURL *)url dataServiceName:(NSString *)dataServiceName loginServiceName:(NSString *)loginServiceName

Parameters:

  • url: Target URL of the service we want to connect to.
  • dataServiceName: Name of the data service. "DataService" - is the default name.
  • loginServiceName: Name of the login service. "LoginService" - is the default name.

login

Method that performs login to secured server. For login it uses or loginString value or username and password properties.

- (BOOL) login

loginWithString:

This methods tries to login with the given connection string. It invokes the LoginEx method of the BaseLoginService of the DataAbstract server.

- (BOOL) loginWithString:(NSString *)aConnectionString

Parameters:

  • aConnectionString: Connection string.

loginWithUsername:password:

This methods tries to login with the given user name and password.

- (BOOL) loginWithUsername:(NSString *)userName password:(NSString *)password

Parameters:

  • userName: Login
  • password: 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.

- (BOOL) loginWithUsername:(NSString *)userName password:(NSString *)password connectionName:(NSString *)connectionName

Parameters:

  • userName: Login
  • password: Password
  • connectionName: Connection name

logout

This method performs the log out.

- (void) logout

Descendants