TDARemoteDataAdapter
From RemObjects Software
This is a Data Abstract Architecture entry
Feel free to add your notes to this topic below.
Overview
The TDARemoteDataAdapter component forms the center of communication from the client to the server. It provides all the logic for retrieving data into TDADataTables, applying changes (Deltas) back to the server and handling any other data-related communication with the server such as retrieving business rules scripts or schema information.
The adapter contains four specialized TDARemoteDataAdapterRequests to configure how communication with the server is handled. These requests can handle talking to the standard v3.0 or v4.0 service interfaces out of the box, or can be configured to any custom server interface you might be using, with Dynamic Method Binding.
File
uDARemoteDataAdapter
Declaration
TDARemoteDataAdapter = class(TDABaseRemoteDataAdapter);
Hierarchy
- TDABaseRemoteDataAdapter
- TDARemoteDataAdapter
Properties
| | | |
|---|---|---|
| CacheSchema | Boolean | Toggles whether the Remote Data Adapter will maintain a local cache of the schema retrieved from the server with subsequent calls to the Schema property. If set to true, the adapter will download the schema the first time the Schema property is accessed, and subsequent accesses will return the same schema instance. If set to false (default), the schema will be re-downloaded from the server every time. You can flush any cached schema by setting this property to false and then immediately back to true, or by calling the FlushSchema method. Set this property to false when you expect frequent changes in the schema information, or when you want to update data tables to a changed server, at design time. Set it to true you want your application to only obtain the schema once and don't expect the server-side schema to change while the application is running. |
| DataStreamer | TDADataStreamer | Defines the type of data streamer to be used for reading and writing data from and to the network. The type of streamer assigned here must match the streamer used on the server's ServiceDataStreamer property. |
| GetDataCall | TDAGetDataRequest | Describes the server call that will be used to fetch data from the server. Please refer to the documentation for TDAGetDataRequest for more details on the individual sub-properties. |
| GetSchemaCall | TDAGetSchemaRequest | Describes the server call that will be used to obtain schema info from the server. This call is mostly at design-time while setting up TDADataTables. Please refer to the documentation for TDAGetSchemaRequest for more details on the individual sub-properties. |
| GetScriptsCall | TDAGetScriptsRequest | Gets access to the server call that will be used to download business rules scripts. Please refer to the documentation for TDAGetScriptsRequest for more details on the individual sub-properties. |
| RemoteService | TRORemoteService | Sets the data service that this adapter will communicate with. |
| Schema | TDASchema | Returns a TDASchema instance representing the schema published by the server. The returned instance is owned and will be freed by the adapter itself. The value of the CacheSchema property determines whether the schema will be re-downloaded on each access, or only once. |
| UpdateDataCall | TDAUpdateDataRequest | Describes the server call that will be used to apply changes back to the server. Please refer to the documentation for TDAUpdateDataRequest for more details on the individual sub-properties. |
Methods
| | |
|---|---|
| ApplyUpdates | Applies all local changes made to the specified TDADataTables to the server. In most scenarios you will not call this method yourself, but simply call ApplyUpdates on the respective data table itself. However, calling ApplyUpdates on the Remote Data Adapter yourself provides additional flexibility, including the option to apply multiple data tables at the same time, avoiding unnecessary server round-trips. |
| Fill | Retrieves data from the server for all of the specified TDADataTables. In most scenarios you will not call this method yourself, but simply Open the respective data table, causing data to be retrieved automatically. However, calling Fill yourself provides additional flexibility, including the option to fill multiple data tables at the same time, avoiding unnecessary server round-trips. |
| FillSchema | Retrieves schema information for all of the specified TDADataTables, and configured their Fields and Params setup to match the schema from the server. You can perform the same task at design-time for individual data tables by right-clicking the data table component and selecting "Retrieve DataTable Schema" from the context menu. |
| FillScripts | Retrieves business rules scripts for all of the specified TDADataTables from the server. Please refer to the business rules scripts help topic for more details. |
| FlushSchema | Flushes any locally cached copy of the schema, ensuring that the schema will be freshly downloaded from the server the next time the Schema property is accessed. |
| SetupDefaultRequest | Resets all four request objects to the default setup used for the new v4.0 service interface. |
| SetupDefaultRequestV3 | Resets all four request objects to the default setup used for legacy v3.0 service interface. |
Events
| | |
|---|---|
| AfterApplyUpdates | Fires directly after the adapter has finished applying updates for a specific data table. |
| AfterGetDataCall | Fires directly after the GetDataCall has been completed. |
| AfterGetSchemaCall | Fires directly after the GetSchemaCall has been completed. |
| AfterGetScriptsCall | Fires directly after the GetScriptsCall has been completed. |
| AfterUpdateDataCall | Fires directly after the UpdateDataCall has been completed. |
| BeforeApplyUpdates | Fires directly before the adapter starts applying updates for a specific data table. |
| BeforeGetDataCall | Fires directly before the GetDataCall will be executed. You can use this event to perform last minute changes to the requests's parameters (such as filling any custom parameters your service might expect, when using Dynamic Method Binding. |
| BeforeGetSchemaCall | Fires directly before the GetSchemaCall will be executed. You can use this event to perform last minute changes to the requests's parameters (such as filling any custom parameters your service might expect, when using Dynamic Method Binding. |
| BeforeGetScriptsCall | Fires directly before the GetScriptsCall will be executed. You can use this event to perform last minute changes to the requests's parameters (such as filling any custom parameters your service might expect, when using Dynamic Method Binding. |
| BeforeUpdateDataCall | Fires directly before the UpdateDataCall will be executed. You can use this event to perform last minute changes to the requests's parameters (such as filling any custom parameters your service might expect, when using Dynamic Method Binding. |
See Also
- Remote Data Adapter
- TDADataTable
- TDARemoteDataAdapterRequest
- Business Rules Scripting
- Dynamic Method Binding
- Lists
Product: RemObjects Data Abstract
Current version: Data Abstract 'Vinci' (5.0)
Lists — Glossary — Features — How To — Drivers — Components — Tools — Samples — Articles — Architecture — Issues
Categories: Text | Data Abstract | Architecture | Class | Delphi
