Package-level declarations

Provides Offline OData framework classes to add offline capability to the application.

The package depends on following packages

  • com.sap.cloud.mobile.foundation
  • com.sap.cloud.mobile.odata

The class com.sap.cloud.mobile.odata.offline.OfflineODataProvider implements the com.sap.cloud.mobile.odata.DataServiceProvider interface and provides offline operations.

  • Error Archive

    Unlike Online OData where errors are discovered immediately, Offline OData errors are not discovered until the upload operation is performed. When a request fails against the OData backend during an upload operation, the request and any relevant details are stored in the ErrorArchive, a special entity set that can be queried using the com.sap.cloud.mobile.odata.offline.OfflineODataProvider. Application developers must determine what to do for these errors.

    Example Usage:

    
    DataQuery query = new DataQuery().orderBy(OfflineODataErrorArchiveEntity.requestID);
    List<OfflineODataErrorArchiveEntity> errorEntities = offlineODataProvider.getErrorArchive(query);
    for (OfflineODataErrorArchiveEntity errorEntity : errorEntities) {
        dataService.loadProperty(OfflineODataErrorArchiveEntity.affectedEntity, errorEntity);
        EntityValue affectedEntity = OfflineODataErrorArchiveEntity.affectedEntity.getEntity(errorEntity);
        // process affected entity
    }
    // remove all errors if (!errorEntities.isEmpty()) { dataService.deleteEntity(errorEntities.get(0)); }
  • EventLog

    Offline OData provides a queryable event log which contains information about Offline OData events (such as downloads and uploads). The event log is represented as a read-only entity set, EventLog, which can be read and queried using the com.sap.cloud.mobile.odata.offline.OfflineODataProvider.

    Example Usage:

    
    DataQuery query = new DataQuery().
        select(OfflineODataEvent.id, OfflineODataEvent.eventType, OfflineODataEvent.details, OfflineODataEvent.time).
        orderBy(OfflineODataEvent.id);
    List<OfflineODataEvent> eventEntities = offlineODataProvider.getEventLog(query);
    for (OfflineODataEvent eventEntity : eventEntities) {
        // process event entity
    }

Types

Link copied to clipboard
Link copied to clipboard
The class represents an exception come from internal issue of client side.
Link copied to clipboard
The class represents an exception raised when client is communicating with server.
Link copied to clipboard
open class OfflineODataCustomHeader : EntityValue
A built-in Offline OData entity type which stores information about Offline OData custom headers.
Link copied to clipboard
A defining query is an OData read request that targets the OData backend associated with the 'OfflineODataProvider' and retrieves a subset of the OData backend data.
Link copied to clipboard
abstract class OfflineODataDelegate
A delegate used to get progress updates while an OfflineODataProvider is opening, downloading, file downloading, uploading, and sending the store to server; to get state change notifications; and to get information about requests that fail during an upload.
Link copied to clipboard
open class OfflineODataErrorArchiveEntity : EntityValue
A built-in Offline OData entity type which stores information about a modification request which failed during an upload operation.
Link copied to clipboard
The name of error.
Link copied to clipboard
open class OfflineODataEvent : EntityValue
A built-in Offline OData entity type which stores information about Offline OData events such as upload and download.
Link copied to clipboard
open class OfflineODataException : Exception
The class represents an exception occurred at OfflineODataProvider operation.
Link copied to clipboard
Link copied to clipboard
The class represents the information of a failed request occurred at OData back end during an uploading.
Link copied to clipboard
The class represents the progress information during a download of file.
Link copied to clipboard
The class represents an exception owing to the input is invalid.
Link copied to clipboard
The static named metadata for built-in entity sets ErrorArchive and EventLog, and their entity types.
Link copied to clipboard
The class represents an exception owing to the target is not found.
Link copied to clipboard
The class represents an exception owing to current operation isn't supported.
Link copied to clipboard
The steps of an open store operation.
Link copied to clipboard
The class represents the configuration details for an OfflineODataProvider.
Link copied to clipboard
The class represents an exception that current operation is blocked owing to precondition is not met.
Link copied to clipboard
The class represents the number of bytes sent and received during a download or upload.
Link copied to clipboard
open class OfflineODataProvider : DataServiceProvider, AutoCloseable
The class represents a DataServiceProvider for Offline OData.
Link copied to clipboard
A delegate used to get progress updates while an OfflineODataProvider is opening, downloading, uploading, and sending the store to server, and to get information about requests that fail during an upload.
Link copied to clipboard
Contains information about the progress of a download operation.
Link copied to clipboard
A class that all Offline OData progress classes inherit from.
Link copied to clipboard
class OfflineODataQueryFunction : QueryFunction
The class provides Offline OData specific QueryFilter.
Link copied to clipboard
open class OfflineODataRequest : EntityValue
A built-in Offline OData entity type which stores information about Offline OData requests to the backend service.
Link copied to clipboard
class OfflineODataRequestOptions : RequestOptions
The class provides Offline OData specific request options.
Link copied to clipboard
This class represents the progress of sending the offline store.
Link copied to clipboard
The class represents an exception come from the server side.
Link copied to clipboard
The class represents the options for the OData back end used by OfflineODataProvider.
Link copied to clipboard