Data Sync Provider
A provider interface for data services which can synchronize data between a local database and a backend system.
Inheritors
Functions
Cancel any download(s) that are currently in progress.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#download(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.download}.
Cancel the specifed pending requests. The requests should be cancelled as a batch, which might perform better than calling {@link com.sap.cloud.mobile.kotlin.odata.PendingRequest#cancel() PendingRequest.cancel} one request at a time.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#getQueuedRequests(com.sap.cloud.mobile.kotlin.odata.DataQuery?, com.sap.cloud.mobile.kotlin.odata.http.HttpHeaders?, com.sap.cloud.mobile.kotlin.odata.RequestOptions?) DataSyncProvider.getQueuedRequests}, {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#getFailedRequests(com.sap.cloud.mobile.kotlin.odata.DataQuery?, com.sap.cloud.mobile.kotlin.odata.http.HttpHeaders?, com.sap.cloud.mobile.kotlin.odata.RequestOptions?) DataSyncProvider.getFailedRequests}.
Cancel any upload(s) that are currently in progress.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#upload(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.upload}.
Clear this provider. This will {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#close() DataSyncProvider.close} the local database, and then delete the database file(s). If the application has other active threads which may try to use the database while it is being cleared, the deletion of the database file(s) might fail.
Close this provider. This will close any connection to the local database held by the current thread. If the application has other active threads which may try to use the database while it is being closed, it might remain open after this call has completed.
Create a persistent query to specify criteria for downloading entities for an entity set. This query is persisted across application restarts. Multiple download queries can be defined for the same entity set (e.g. with different filters).
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataQuery#entitySet DataQuery.entitySet}, {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#deleteDownloadQuery(kotlin.String) DataSyncProvider.deleteDownloadQuery}, {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#getDownloadQuery(kotlin.String) DataSyncProvider.getDownloadQuery}, {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#getDownloadQueries(com.sap.cloud.mobile.kotlin.odata.EntitySet?) DataSyncProvider.getDownloadQueries}.
Delete a persistent query previously created by {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#createDownloadQuery(kotlin.String, com.sap.cloud.mobile.kotlin.odata.DataQuery, kotlin.Boolean) DataSyncProvider.createDownloadQuery}, along with any previously downloaded associated entities. Note: if there is a large number of previously downloaded associated entities, deletion of the download query might be time-consuming.
Download backend data changes into the local database.
Return a named download group; the group is created if it doesn't exist already.
Retrieve all of the persistent queries previously created by {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#createDownloadQuery(kotlin.String, com.sap.cloud.mobile.kotlin.odata.DataQuery, kotlin.Boolean) DataSyncProvider.createDownloadQuery} for a specified entity set.
Retrieve a persistent query previously created by {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#createDownloadQuery(kotlin.String, com.sap.cloud.mobile.kotlin.odata.DataQuery, kotlin.Boolean) DataSyncProvider.createDownloadQuery}.
Return a list of the synchronization events since the local database was created.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.SyncEvent#eventID SyncEvent.eventID}, {@link com.sap.cloud.mobile.kotlin.odata.SyncEvent#type SyncEvent.type}, {@link com.sap.cloud.mobile.kotlin.odata.SyncEvent#time SyncEvent.time}, {@link com.sap.cloud.mobile.kotlin.odata.SyncEvent#details SyncEvent.details}.
Return a list of the failed pending requests in the local database (matching the query, if specified).
This includes requests that have been sent to the backend system, but which failed to execute successfully.
Return (nullable) the previous user of the local database (if any).
Return a list of the queued pending requests in the local database (matching the query, if specified).
This includes requests that have never been sent to the backend system, as well as requests that were previously sent but which failed.
Return true if there are any failed requests in the local database (matching the query, if specified).
Return true if a {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#download(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.download} has previously been successfully executed to obtain initial data for the local database.
Return true if a {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#download(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.download} is currently in progress or if the previous download did not terminate normally (i.e. it failed or was cancelled).
Return true if an {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#upload(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.upload} is currently in progress or if the previous upload did not terminate normally (i.e. it failed or was cancelled).
Return true if there are any queued requests in the local database (matching the query, if specified).
Return (nullable) Date and time for the last {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#download(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.download} request.
Return (nullable) Date and time for the last {@link com.sap.cloud.mobile.kotlin.odata.DataSyncProvider#upload(com.sap.cloud.mobile.kotlin.odata.StringList, com.sap.cloud.mobile.kotlin.odata.SyncOptions) DataSyncProvider.upload} request.
Undo all pending (local) changes for entities, so they will not be subsequently uploaded.
Upload data changes for all uploadable entity sets.
Upload a copy of the local database file (or files) to the backend server (or an intermediary server) for diagnostic purposes.
Note: if the local database is encrypted, and encryptionKey is null, this operation might fail (depending on the provider).
Note: if the local database is not encrypted, and encryptionKey is non-null, this operation might fail (depending on the provider).