public interface IKonyObjectSync
Modifier and Type | Method and Description |
---|---|
void |
cancelSync(Map<String,Object> options,
KNYCallback syncCallback)
Cancellation of Object level Sync session
|
void |
create(HashMap<String,Object> record,
HashMap<String,Object> options,
KNYCallback syncCallback)
Create method provides ability to create record in local database
|
void |
delete(HashMap<String,Object> options,
KNYCallback syncCallback)
Deletes a record from the local database
|
void |
deleteByPK(HashMap<String,Object> options,
KNYCallback syncCallback)
Delete method provides ability to Delete record by primary key(s) from local Database
|
void |
get(HashMap<String,Object> options,
KNYCallback syncCallback)
Get method provides ability to fetch records from local database
|
void |
getBinary(Map<String,Object> options,
KNYBinaryDownloadCallback knyBinaryDownloadCallback)
Downloads binary for the specified column name and primary key(s) of the object.
|
void |
getPendingRecordsForUpload(HashMap<String,Object> options,
KNYCallback syncCallback)
Method to fetch the records to be uploaded.
|
void |
getUploadDeferredRecordKeys(KNYCallback syncCallback)
fetches all the differed record primary keys
|
void |
markForUpload(Map<String,Object> options,
KNYCallback syncCallback)
Mark for upload method provides ability to mark a record for upload from local Database
|
void |
rollback(Map<String,Object> primaryKeyValueMap,
KNYCallback syncCallback)
Rollback on Object
|
void |
startSync(Map<String,Object> context,
KNYCallback callback,
KNYProgressCallback konySyncProgressCallback)
Object Level Start Sync Session
|
void |
update(HashMap<String,Object> record,
HashMap<String,Object> options,
KNYCallback syncCallback)
Updates a record in the local database
|
void |
updateByPK(HashMap<String,Object> record,
HashMap<String,Object> options,
KNYCallback syncCallback)
Update method provides ability to update record by primary key(s) in local database
|
void startSync(Map<String,Object> context, KNYCallback callback, KNYProgressCallback konySyncProgressCallback) throws Exception
context
- Callbacks Other then Success and Failure, which are explicitly invoked.callback
- Success and Failure Callbacks for startSync.konySyncProgressCallback
- Exception
void create(HashMap<String,Object> record, HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
record
- - list of field to be populated in record during creationoptions
- - parameter for future extensibility. MarkforUpload parameter should come through this data structuresyncCallback
- - success and error callback. Success callback returns a primary key map of record created.Exception
void update(HashMap<String,Object> record, HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
record
- Map containing the column names and respective values to be updated in the record.options
- User specified options for updating the record.
This includes PrimaryKey(s), Disable change tracking options, MarkForUpload, whereCondition
and whereConditionAsAString.syncCallback
- contains the success and failure callbacks.
On success, returns the count of successfully updated records
On failure, returns an error object containing the error code, domain and userinfo.
The userInfo will contain the actual reason for failure and the stack trace.Exception
- in case of errorsvoid updateByPK(HashMap<String,Object> record, HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
record
- Map containing the column names and respective values to be updated in the record.options
- User specified options for updating the record.
This includes PrimaryKey(s), Disable change tracking options and MarkForUploadsyncCallback
- contains the success and failure callbacks.
On success, returns the count of successfully updated records.
On failure, returns an error object containing the error code, domain and userinfo.
The userInfo will contain the actual reason for failure and the stack trace.Exception
- in case of errorsvoid delete(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
options
- User specified options for deleting a record.
This includes PrimaryKey(s), Disable change tracking options, MarkForUpload, whereCondition
and whereConditionAsAString.syncCallback
- contains the success and failure callbacks.
On success, returns true on successful deletion of the record, else false.
On failure, returns an error object containing the error code, domain and userinfo.
The userInfo will contain the actual reason for failure and the stack trace.Exception
- in case of errorsvoid deleteByPK(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
options
- User specified options for deleting a record.
This includes PrimaryKey(s), Disable change tracking options and MarkForUpload.syncCallback
- contains the success and failure callbacks.
On success, rturns true on successful deletion of the record, else false.
On failure, returns an error object containing the error code, domain and userinfo.
The userInfo will contain the actual reason for failure and the stack trace.Exception
- in case of errorsvoid get(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
options
- - Where clause, OrderBy map, Limit, Offset, MarkforUploadsyncCallback
- - success and error callback. Success callback contains a map of the record retrieved.Exception
void rollback(Map<String,Object> primaryKeyValueMap, KNYCallback syncCallback)
primaryKeyValueMap
- of record only for which rollback should happensyncCallback
- for success and error callbacksvoid markForUpload(Map<String,Object> options, KNYCallback syncCallback) throws Exception
options
- - Primary key of record, markforUploadsyncCallback
- - success or error callback.
Success call back returns true.Exception
void getUploadDeferredRecordKeys(KNYCallback syncCallback) throws Exception
syncCallback
- - success or error callback.
Success call back returns true.Exception
void cancelSync(Map<String,Object> options, KNYCallback syncCallback)
options
- Options for cancellationsyncCallback
- For success and error callbacksvoid getBinary(Map<String,Object> options, KNYBinaryDownloadCallback knyBinaryDownloadCallback)
options
- - Options specific to the file to be downloaded
binaryColumnName: String
forceDownload: boolean
chunkSize: integer
primaryKeys: Map of column name and value
fileId: ID which user wants to name the file with. This will be appended with timestampknyBinaryDownloadCallback
- - callbacks for download status (BinaryDownloadCallback includes
onFileDownloadStarted, onFileDownloadCompleted
,onStreamDownloadCompleted, onChunkDownloadCompleted
onDownloadFailure )void getPendingRecordsForUpload(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
options
- User defined options to be sent.syncCallback
- Callback to be invoked on completion.Exception
- Exception thrown, if any.