RemoteDataAdapter

Overview

The RemoteDataAdapter represents client-side access to data tables published on the server.

It can be used to retrieve schema information, to execute commands, to fill a data table(s) with data from the server or to apply local updates back to the server. It can also perform login, if required.

By default, a newly instantiated RemoteDataAdapter is configured for the standard services provided by Data Abstract 4.0 servers, like IDataAbstractService and IBaseLoginService with correspondent names DataService LoginService . However, it's customizable in several ways:

  • If you've changed only names of any mentioned services on your server, simply call setDataServiceName / setLoginServiceName methods of the RemoteDataAdapter to change them on client as well.
  • If you need more advanced configuration for service calls, you can provide your own implementation of IDataAbstractService or IBaseLoginService and set it with setDataService / setLoginService methods.

Other components as data streamer, client channel, message can be also configured manually by using appropriate setter methods. You don't need to deal with it in most cases though. Use create() instead - a static methods that supports URL Schemes and will return preconfigured instance of RemoteDataAdapter class according to provided server target Url.

The RemoteDataAdapter gives possibility to work with DA server in both synchronous(blocking) and asynchronous(non-blocking) way. Last one will be very convenient on mobile platforms, that either prevent or even forbid synchronous network operation in the main (UI) thread. Therefore, for almost every do method you may find its doAsync clone. All async methods return RequestTask inheritors: the one difference between these inheritors is in type of returned result. fill and applyChanges tasks will have void result, they just update correspondent instances of datatables; executeCommand in turn provides getCommandResult property to get the comand executoin result. The similar situation with readSchema that provides getSchema and login that contains getLogged method.

Location

 

constructor

Default constructor that creates an instance of RemoteDataAdapter class with default data and login service names.

 

constructor

 

RemoteDataAdapter()

constructor (String, String)

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

constructor(dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(String dataServiceName, String loginServiceName)

Parameters:

  • dataServiceName: a command name from Schema.
  • loginServiceName: an array of command parameters.

constructor (URI)

 

constructor(url: URI)

 

RemoteDataAdapter(URI url)

Parameters:

  • url:

constructor (URI, String)

 

constructor(url: URI; dataServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName)

Parameters:

  • url:
  • dataServiceName:

constructor (URI, String, String)

 

constructor(url: URI; dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url:
  • dataServiceName:
  • loginServiceName:

AcceptTableChanges

 

property AcceptTableChanges: Boolean read write;

 

Boolean AcceptTableChanges { __get; __set; }

addListener

Add a subscriber to adapter's notifications.

 

method addListener(aListener: RemoteDataAdapterListener)

 

void addListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of RemoteDataAdapterListener interface implementation - adapters notification listener interface. If you need to subscribe on just some notification(s), you can use AbstractRemoteDataAdapter class by extending it and overriding only necessary methods.

applyChanges (DataTable)

apply changes that were made locally with specific data table to the server.

 

method applyChanges(aDataTable: DataTable)

 

void applyChanges(DataTable aDataTable)

Parameters:

  • aDataTable: a data table with changes to be sent.

applyChanges (DataTable[])

apply local changes of a set of data tables up to the server.

 

method applyChanges(aDataTablesArray: array of DataTable)

 

void applyChanges(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: a set of tables with changes to be sent.

applyChanges (Delta[])

apply changes from passed set of deltas up to the server. This overload doesn't need a data table to collect changes, but a manually created array of deltas.

 

method applyChanges(aDeltasArray: array of Delta)

 

void applyChanges(Delta[] aDeltasArray)

Parameters:

  • aDeltasArray: an array of deltas to send to the server.

applyChangesAsync (DataTable, Callback): UpdateRequestTask

Asynchronously applies local data table changes to the server.

 

method applyChangesAsync(aDataTable: DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: a data table with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (DataTable[], Callback): UpdateRequestTask

Asynchronously applies local data tables' changes to the server.

 

method applyChangesAsync(aDataTablesArray: array of DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: A set of tables with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (Delta[], Callback): UpdateRequestTask

Asynchronously applies changes from the given deltas' set to the server. This overload doesn't need data tables to collect changes, but a manually created array of deltas.

 

method applyChangesAsync(aDeltasArray: array of Delta; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(Delta[] aDeltasArray, Callback aCallback)

Parameters:

  • aDeltasArray: An array of deltas to send to the server.
  • aCallback: An instance of a callback that will be notified after an update request finish.

AutoCreateServices

 

property AutoCreateServices: Boolean read write;

 

Boolean AutoCreateServices { __get; __set; }

ClientChannel

 

property ClientChannel: ClientChannel read write;

 

ClientChannel ClientChannel { __get; __set; }

create (URI): RemoteDataAdapter

 

class method create(url: URI): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url)

Parameters:

  • url:

create (URI, String): RemoteDataAdapter

 

class method create(url: URI; dataServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName)

Parameters:

  • url:
  • dataServiceName:

create (URI, String, String): RemoteDataAdapter

 

class method create(url: URI; dataServiceName: String; loginServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url:
  • dataServiceName:
  • loginServiceName:

DataService

 

property DataService: IDataAbstractService read write;

 

IDataAbstractService DataService { __get; __set; }

DataServiceName

 

property DataServiceName: String read write;

 

String DataServiceName { __get; __set; }

DataStreamer

 

property DataStreamer: DataStreamer read write;

 

DataStreamer DataStreamer { __get; __set; }

DynamicSelect

 

property DynamicSelect: Boolean read write;

 

Boolean DynamicSelect { __get; __set; }

executeCommand (String): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommand(aName: String): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName)

Parameters:

  • aName: a command name from Schema.

executeCommand (String, String[], Object[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommand(aName: String; aParameterNames: array of String; aParameterValues: array of Object): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, String[] aParameterNames, Object[] aParameterValues)

Parameters:

  • aName: a command name from Schema.
  • aParameterNames: an array of connamd parameter names.
  • aParameterValues: an array of command parameter values.

executeCommand (String, DataParameter[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommand(aName: String; inParams: array of DataParameter): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, DataParameter[] inParams)

Parameters:

  • aName: a command name from Schema.
  • inParams: an array of command parameters.

executeCommandAsync (String, Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommandAsync(aName: String; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, String[], Object[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommandAsync(aName: String; aParameterNames: array of String; aParameterValues: array of Object; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, String[] aParameterNames, Object[] aParameterValues, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aParameterNames: An array of connamd parameter names.
  • aParameterValues: An array of command parameter values.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, DataParameter[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommandAsync(aName: String; inParams: array of DataParameter; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, DataParameter[] inParams, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • inParams: An array of command parameters.
  • aCallback: An instance of a callback that will be notified after a command request finish.

fill (DataTable)

The method fills the given data table with the data from the server. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fill(aDataTable: DataTable)

 

void fill(DataTable aDataTable)

Parameters:

  • aDataTable: a data table instance to fill.

The method fills given data table with the data from the server. This overload gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo)

 

void fill(DataTable aDataTable, TableRequestInfo aTableRequestInfo)

Parameters:

  • aDataTable: a data table instance for filling.
  • aTableRequestInfo: a table request object instance for applying during request.

The method fills given data table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fill(aDataTable: DataTable; aWhereClause: WhereExpression)

 

void fill(DataTable aDataTable, WhereExpression aWhereClause)

Parameters:

  • aDataTable: a data table instance for filling.
  • aWhereClause: a Dynamic Where clause for applying during request.

fill (DataTable[])

The method fills given data tables with the data from the server.

 

method fill(aDataTablesArray: array of DataTable)

 

void fill(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: an array of data tables to fill.

The method fills given data tables with the data from the server. This overload gives you significant possibilities to customize your fill requests, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo)

 

void fill(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aTableRequestInfosArray: an array of table request objects for applying during the fill request.

The method fills given data tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fill(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression)

 

void fill(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aWhereClauses: an array of Dynamic Where clauses for applying during the fill request.

fillAsync (DataTable, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fillAsync(aDataTable: DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, TableRequestInfo, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, TableRequestInfo aTableRequestInfo, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aTableRequestInfo: A table request object instance to apply during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, WhereExpression, Callback): FillRequestTask

The asynchronous version of method that fills given table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fillAsync(aDataTable: DataTable; aWhereClause: WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, WhereExpression aWhereClause, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aWhereClause: a Dynamic Where clause for applying during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], Callback): FillRequestTask

The method fills given data tables' set with the data from the server in an asynchronous manner.

 

method fillAsync(aDataTablesArray: array of DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of data tables to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], TableRequestInfo[], Callback): FillRequestTask

The method fills given tables' array with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aTableRequestInfosArray: An array of request info objects for applying during the fill request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], WhereExpression[], Callback): FillRequestTask

The asynchronous version of method that fills given tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fillAsync(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aWhereClauses: An array of Dynamic Where objects for applying during the fill request. Each item in array should correspond to the item from aDataTablesArray at the same index.
  • aCallback: A callback instance to be notified after a fill request finish.

fillWithSql

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

method fillWithSql(dataTable: DataTable; sql: String; parameters: array of DataParameter)

 

void fillWithSql(DataTable dataTable, String sql, DataParameter[] parameters)

Parameters:

  • dataTable: a data table instance for filling.
  • sql: A DA SQL query string.
  • parameters: Optional parameters, if such required by SQL string.

fillWithSqlAsync

 

method fillWithSqlAsync(dataTable: DataTable; sql: String; parameters: array of DataParameter; callback: Callback): FillRequestTask

 

FillRequestTask fillWithSqlAsync(DataTable dataTable, String sql, DataParameter[] parameters, Callback callback)

Parameters:

  • dataTable:
  • sql:
  • parameters:
  • callback:

finalize  protected

Releases all resources that could possibly be used by the adapter's instance.

 

method finalize

 

void finalize()

ForceApplySchema

 

property ForceApplySchema: Boolean read write;

 

Boolean ForceApplySchema { __get; __set; }

login (String): Boolean

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.

 

method login(aLoginString: String): Boolean

 

Boolean login(String aLoginString)

Parameters:

  • aLoginString: a preformatted LoginEx string.

login (String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String): Boolean

 

Boolean login(String aUserName, String aPassword)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.

login (String, String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String; aConnectionName: String): Boolean

 

Boolean login(String aUserName, String aPassword, String aConnectionName)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.

loginAsync (String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name, password and connection name. It's used in case server side service has multiple connections.

 

method loginAsync(aLoginString: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aLoginString, Callback aCallback)

Parameters:

  • aLoginString: A preformatted LoginEx string.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aConnectionName: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, String aConnectionName, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.
  • aCallback: A callback instance to be notified after a login request finish.

LoginService

 

property LoginService: IBaseLoginService read write;

 

IBaseLoginService LoginService { __get; __set; }

LoginServiceName

 

property LoginServiceName: String read write;

 

String LoginServiceName { __get; __set; }

logout

Performs the log out.

 

method logout

 

void logout()

logoutAsync

Performs the log out asynchronously.

 

method logoutAsync(aCallback: Callback): LoginRequestTask

 

LoginRequestTask logoutAsync(Callback aCallback)

Parameters:

  • aCallback: A callback instance to be notified after a login request finish.

Message

 

property Message: Message read write;

 

Message Message { __get; __set; }

readSchema

 

method readSchema(forceReload: Boolean): Schema

 

Schema readSchema(Boolean forceReload)

Parameters:

  • forceReload:

readSchemaAsync

The method returns a Schema for the Data Abstract service asynchronously and caches it to avoid redundant server load. If adapter has cached schema, method returns this instance without extra network call.

 

method readSchemaAsync(aForceReRead: Boolean; aCallback: Callback): SchemaRequestTask

 

SchemaRequestTask readSchemaAsync(Boolean aForceReRead, Callback aCallback)

Parameters:

  • aForceReRead: If true, methods forces to redownload schema from the server in spite of the cached value.
  • aCallback: A callback instance to be notified after schema request finishes.

removeListener

removes adapter's listener, if it was actually subscribed (by calling addListener method).

 

method removeListener(aListener: RemoteDataAdapterListener)

 

void removeListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of the listener to remove.

shutdown

The method should be called when you don't need the instance any more. Internally, it will release resources if any have been acquired by the adapter.

 

method shutdown

 

void shutdown()

Status

 

property Status: DataAdapterStatus read;

 

DataAdapterStatus Status { __get; }

TaskCallbackExecutor

 

property TaskCallbackExecutor: Executor read write;

 

Executor TaskCallbackExecutor { __get; __set; }

TaskExecutor

 

property TaskExecutor: Executor read write;

 

Executor TaskExecutor { __get; __set; }

 

AcceptTableChanges

 

property AcceptTableChanges: Boolean read write;

 

Boolean AcceptTableChanges { __get; __set; }

AutoCreateServices

 

property AutoCreateServices: Boolean read write;

 

Boolean AutoCreateServices { __get; __set; }

ClientChannel

 

property ClientChannel: ClientChannel read write;

 

ClientChannel ClientChannel { __get; __set; }

DataService

 

property DataService: IDataAbstractService read write;

 

IDataAbstractService DataService { __get; __set; }

DataServiceName

 

property DataServiceName: String read write;

 

String DataServiceName { __get; __set; }

DataStreamer

 

property DataStreamer: DataStreamer read write;

 

DataStreamer DataStreamer { __get; __set; }

DynamicSelect

 

property DynamicSelect: Boolean read write;

 

Boolean DynamicSelect { __get; __set; }

ForceApplySchema

 

property ForceApplySchema: Boolean read write;

 

Boolean ForceApplySchema { __get; __set; }

LoginService

 

property LoginService: IBaseLoginService read write;

 

IBaseLoginService LoginService { __get; __set; }

LoginServiceName

 

property LoginServiceName: String read write;

 

String LoginServiceName { __get; __set; }

Message

 

property Message: Message read write;

 

Message Message { __get; __set; }

Status

 

property Status: DataAdapterStatus read;

 

DataAdapterStatus Status { __get; }

TaskCallbackExecutor

 

property TaskCallbackExecutor: Executor read write;

 

Executor TaskCallbackExecutor { __get; __set; }

TaskExecutor

 

property TaskExecutor: Executor read write;

 

Executor TaskExecutor { __get; __set; }

 

create (URI): RemoteDataAdapter

 

class method create(url: URI): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url)

Parameters:

  • url:

create (URI, String): RemoteDataAdapter

 

class method create(url: URI; dataServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName)

Parameters:

  • url:
  • dataServiceName:

create (URI, String, String): RemoteDataAdapter

 

class method create(url: URI; dataServiceName: String; loginServiceName: String): RemoteDataAdapter

 

static RemoteDataAdapter create(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url:
  • dataServiceName:
  • loginServiceName:

 

constructor

Default constructor that creates an instance of RemoteDataAdapter class with default data and login service names.

 

constructor

 

RemoteDataAdapter()

constructor (String, String)

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

constructor(dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(String dataServiceName, String loginServiceName)

Parameters:

  • dataServiceName: a command name from Schema.
  • loginServiceName: an array of command parameters.

constructor (URI)

 

constructor(url: URI)

 

RemoteDataAdapter(URI url)

Parameters:

  • url:

constructor (URI, String)

 

constructor(url: URI; dataServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName)

Parameters:

  • url:
  • dataServiceName:

constructor (URI, String, String)

 

constructor(url: URI; dataServiceName: String; loginServiceName: String)

 

RemoteDataAdapter(URI url, String dataServiceName, String loginServiceName)

Parameters:

  • url:
  • dataServiceName:
  • loginServiceName:

addListener

Add a subscriber to adapter's notifications.

 

method addListener(aListener: RemoteDataAdapterListener)

 

void addListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of RemoteDataAdapterListener interface implementation - adapters notification listener interface. If you need to subscribe on just some notification(s), you can use AbstractRemoteDataAdapter class by extending it and overriding only necessary methods.

applyChanges (DataTable)

apply changes that were made locally with specific data table to the server.

 

method applyChanges(aDataTable: DataTable)

 

void applyChanges(DataTable aDataTable)

Parameters:

  • aDataTable: a data table with changes to be sent.

applyChanges (DataTable[])

apply local changes of a set of data tables up to the server.

 

method applyChanges(aDataTablesArray: array of DataTable)

 

void applyChanges(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: a set of tables with changes to be sent.

applyChanges (Delta[])

apply changes from passed set of deltas up to the server. This overload doesn't need a data table to collect changes, but a manually created array of deltas.

 

method applyChanges(aDeltasArray: array of Delta)

 

void applyChanges(Delta[] aDeltasArray)

Parameters:

  • aDeltasArray: an array of deltas to send to the server.

applyChangesAsync (DataTable, Callback): UpdateRequestTask

Asynchronously applies local data table changes to the server.

 

method applyChangesAsync(aDataTable: DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: a data table with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (DataTable[], Callback): UpdateRequestTask

Asynchronously applies local data tables' changes to the server.

 

method applyChangesAsync(aDataTablesArray: array of DataTable; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: A set of tables with changes to be sent.
  • aCallback: An instance of a callback that will be notified after an update request finish.

applyChangesAsync (Delta[], Callback): UpdateRequestTask

Asynchronously applies changes from the given deltas' set to the server. This overload doesn't need data tables to collect changes, but a manually created array of deltas.

 

method applyChangesAsync(aDeltasArray: array of Delta; aCallback: Callback): UpdateRequestTask

 

UpdateRequestTask applyChangesAsync(Delta[] aDeltasArray, Callback aCallback)

Parameters:

  • aDeltasArray: An array of deltas to send to the server.
  • aCallback: An instance of a callback that will be notified after an update request finish.

executeCommand (String): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommand(aName: String): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName)

Parameters:

  • aName: a command name from Schema.

executeCommand (String, String[], Object[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommand(aName: String; aParameterNames: array of String; aParameterValues: array of Object): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, String[] aParameterNames, Object[] aParameterValues)

Parameters:

  • aName: a command name from Schema.
  • aParameterNames: an array of connamd parameter names.
  • aParameterValues: an array of command parameter values.

executeCommand (String, DataParameter[]): RemoteCommandResult

Provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommand(aName: String; inParams: array of DataParameter): RemoteCommandResult

 

RemoteCommandResult executeCommand(String aName, DataParameter[] inParams)

Parameters:

  • aName: a command name from Schema.
  • inParams: an array of command parameters.

executeCommandAsync (String, Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service.

To enable execution of commands from the client, set the AllowExecuteCommand property of your DataAbstractService to true and ensure that all published Commands in your schema are safe for execution. Also, you need to have proper authentication methods in place to prevent anonymous users from making malicious calls.

 

method executeCommandAsync(aName: String; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, String[], Object[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as two separate arrays: an array of parameter names and commensurate array of parameter values.

Note, that output parameters must be also included in these arrays.

 

method executeCommandAsync(aName: String; aParameterNames: array of String; aParameterValues: array of Object; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, String[] aParameterNames, Object[] aParameterValues, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • aParameterNames: An array of connamd parameter names.
  • aParameterValues: An array of command parameter values.
  • aCallback: An instance of a callback that will be notified after a command request finish.

executeCommandAsync (String, DataParameter[], Callback): CommandRequestTask

The asynchronous version of executeCommand method that provides the ability to dynamically invoke commands (stored procedures or SQL statements) from the Schema published by your service. This is an overload that accepts command parameters. Here, you need to pass them as an array of initialized DataParameter instances.

Note, that output parameters must be also included in theese arrays.

 

method executeCommandAsync(aName: String; inParams: array of DataParameter; aCallback: Callback): CommandRequestTask

 

CommandRequestTask executeCommandAsync(String aName, DataParameter[] inParams, Callback aCallback)

Parameters:

  • aName: A command name from Schema.
  • inParams: An array of command parameters.
  • aCallback: An instance of a callback that will be notified after a command request finish.

fill (DataTable)

The method fills the given data table with the data from the server. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fill(aDataTable: DataTable)

 

void fill(DataTable aDataTable)

Parameters:

  • aDataTable: a data table instance to fill.

The method fills given data table with the data from the server. This overload gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo)

 

void fill(DataTable aDataTable, TableRequestInfo aTableRequestInfo)

Parameters:

  • aDataTable: a data table instance for filling.
  • aTableRequestInfo: a table request object instance for applying during request.

The method fills given data table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fill(aDataTable: DataTable; aWhereClause: WhereExpression)

 

void fill(DataTable aDataTable, WhereExpression aWhereClause)

Parameters:

  • aDataTable: a data table instance for filling.
  • aWhereClause: a Dynamic Where clause for applying during request.

fill (DataTable[])

The method fills given data tables with the data from the server.

 

method fill(aDataTablesArray: array of DataTable)

 

void fill(DataTable[] aDataTablesArray)

Parameters:

  • aDataTablesArray: an array of data tables to fill.

The method fills given data tables with the data from the server. This overload gives you significant possibilities to customize your fill requests, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fill(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo)

 

void fill(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aTableRequestInfosArray: an array of table request objects for applying during the fill request.

The method fills given data tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fill(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression)

 

void fill(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses)

Parameters:

  • aDataTablesArray: an array of data tables for filling.
  • aWhereClauses: an array of Dynamic Where clauses for applying during the fill request.

fillAsync (DataTable, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. Please, consider:

  • table should be named the same as one of the schema's tables.
  • all existing data in the table will be erased before filling it with new bundle from the server.

 

method fillAsync(aDataTable: DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, TableRequestInfo, Callback): FillRequestTask

The method fills given data table with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTable: DataTable; aTableRequestInfo: TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, TableRequestInfo aTableRequestInfo, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aTableRequestInfo: A table request object instance to apply during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable, WhereExpression, Callback): FillRequestTask

The asynchronous version of method that fills given table with the data from the server with a glance of the table name and a Dynamic Where clause.

 

method fillAsync(aDataTable: DataTable; aWhereClause: WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable aDataTable, WhereExpression aWhereClause, Callback aCallback)

Parameters:

  • aDataTable: A data table instance to fill.
  • aWhereClause: a Dynamic Where clause for applying during request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], Callback): FillRequestTask

The method fills given data tables' set with the data from the server in an asynchronous manner.

 

method fillAsync(aDataTablesArray: array of DataTable; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of data tables to fill.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], TableRequestInfo[], Callback): FillRequestTask

The method fills given tables' array with the data from the server in an asynchronous manner. It gives you significant possibilities to customize your fill request, where you can use the TableRequestInfo, created by yourself. You can create its inheritors of version 5 and version 6 as well.

 

method fillAsync(aDataTablesArray: array of DataTable; aTableRequestInfosArray: array of TableRequestInfo; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, TableRequestInfo[] aTableRequestInfosArray, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aTableRequestInfosArray: An array of request info objects for applying during the fill request.
  • aCallback: A callback instance to be notified after a fill request finish.

fillAsync (DataTable[], WhereExpression[], Callback): FillRequestTask

The asynchronous version of method that fills given tables with the data from the server with a glance of table names and correspondent Dynamic Where clauses.

 

method fillAsync(aDataTablesArray: array of DataTable; aWhereClauses: array of WhereExpression; aCallback: Callback): FillRequestTask

 

FillRequestTask fillAsync(DataTable[] aDataTablesArray, WhereExpression[] aWhereClauses, Callback aCallback)

Parameters:

  • aDataTablesArray: An array of tables to fill.
  • aWhereClauses: An array of Dynamic Where objects for applying during the fill request. Each item in array should correspond to the item from aDataTablesArray at the same index.
  • aCallback: A callback instance to be notified after a fill request finish.

fillWithSql

The method fills given data table with the data from the server with a glance of SQL string using TableRequestInfoV6 with DA SQL under the hood.

 

method fillWithSql(dataTable: DataTable; sql: String; parameters: array of DataParameter)

 

void fillWithSql(DataTable dataTable, String sql, DataParameter[] parameters)

Parameters:

  • dataTable: a data table instance for filling.
  • sql: A DA SQL query string.
  • parameters: Optional parameters, if such required by SQL string.

fillWithSqlAsync

 

method fillWithSqlAsync(dataTable: DataTable; sql: String; parameters: array of DataParameter; callback: Callback): FillRequestTask

 

FillRequestTask fillWithSqlAsync(DataTable dataTable, String sql, DataParameter[] parameters, Callback callback)

Parameters:

  • dataTable:
  • sql:
  • parameters:
  • callback:

finalize  protected

Releases all resources that could possibly be used by the adapter's instance.

 

method finalize

 

void finalize()

login (String): Boolean

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.

 

method login(aLoginString: String): Boolean

 

Boolean login(String aLoginString)

Parameters:

  • aLoginString: a preformatted LoginEx string.

login (String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String): Boolean

 

Boolean login(String aUserName, String aPassword)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.

login (String, String, String): Boolean

This method tries to login with the given user name and password. It uses login service proxy associated with the adapter.

 

method login(aUserName: String; aPassword: String; aConnectionName: String): Boolean

 

Boolean login(String aUserName, String aPassword, String aConnectionName)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.

loginAsync (String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name, password and connection name. It's used in case server side service has multiple connections.

 

method loginAsync(aLoginString: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aLoginString, Callback aCallback)

Parameters:

  • aLoginString: A preformatted LoginEx string.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aCallback: A callback instance to be notified after a login request finish.

loginAsync (String, String, String, Callback): LoginRequestTask

The asynchronous version of login method that tries to login with the given user name and password.

 

method loginAsync(aUserName: String; aPassword: String; aConnectionName: String; aCallback: Callback): LoginRequestTask

 

LoginRequestTask loginAsync(String aUserName, String aPassword, String aConnectionName, Callback aCallback)

Parameters:

  • aUserName: A user name string.
  • aPassword: A user's password.
  • aConnectionName: A connection name of database to use for login.
  • aCallback: A callback instance to be notified after a login request finish.

logout

Performs the log out.

 

method logout

 

void logout()

logoutAsync

Performs the log out asynchronously.

 

method logoutAsync(aCallback: Callback): LoginRequestTask

 

LoginRequestTask logoutAsync(Callback aCallback)

Parameters:

  • aCallback: A callback instance to be notified after a login request finish.

readSchema

 

method readSchema(forceReload: Boolean): Schema

 

Schema readSchema(Boolean forceReload)

Parameters:

  • forceReload:

readSchemaAsync

The method returns a Schema for the Data Abstract service asynchronously and caches it to avoid redundant server load. If adapter has cached schema, method returns this instance without extra network call.

 

method readSchemaAsync(aForceReRead: Boolean; aCallback: Callback): SchemaRequestTask

 

SchemaRequestTask readSchemaAsync(Boolean aForceReRead, Callback aCallback)

Parameters:

  • aForceReRead: If true, methods forces to redownload schema from the server in spite of the cached value.
  • aCallback: A callback instance to be notified after schema request finishes.

removeListener

removes adapter's listener, if it was actually subscribed (by calling addListener method).

 

method removeListener(aListener: RemoteDataAdapterListener)

 

void removeListener(RemoteDataAdapterListener aListener)

Parameters:

  • aListener: an instance of the listener to remove.

shutdown

The method should be called when you don't need the instance any more. Internally, it will release resources if any have been acquired by the adapter.

 

method shutdown

 

void shutdown()