public class KNYObj extends Object implements IKonyObjectSync
| Constructor and Description | 
|---|
KNYObj(String name)
Creates Object Level Sync Object. 
 | 
| 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)
Object Level getPendingRecordsForUpload 
 | 
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 syncCallback,
         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 
 | 
public void startSync(Map<String,Object> context, KNYCallback syncCallback, KNYProgressCallback konySyncProgressCallback) throws Exception
startSync in interface IKonyObjectSynccontext - the contextsyncCallback - sync success and error callbackskonySyncProgressCallback - sync progress callbacksException - exception in case of any errorspublic void getPendingRecordsForUpload(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
getPendingRecordsForUpload in interface IKonyObjectSyncoptions - the optionssyncCallback - getPendingRecordsForUpload success and error callbacksException - exception in case of any errorspublic void create(HashMap<String,Object> record, HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSynccreate in interface IKonyObjectSyncrecord - - 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.Exceptionpublic void update(HashMap<String,Object> record, HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSyncupdate in interface IKonyObjectSyncrecord - 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 errorspublic void updateByPK(HashMap<String,Object> record, HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSyncupdateByPK in interface IKonyObjectSyncrecord - 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 errorspublic void delete(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSyncdelete in interface IKonyObjectSyncoptions - 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 errorspublic void deleteByPK(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSyncdeleteByPK in interface IKonyObjectSyncoptions - 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 errorspublic void get(HashMap<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSyncget in interface IKonyObjectSyncoptions - - Where clause, OrderBy map, Limit, Offset, MarkforUploadsyncCallback - - success and error callback. Success callback contains a map of the record retrieved.Exceptionpublic void rollback(Map<String,Object> primaryKeyValueMap, KNYCallback syncCallback)
rollback in interface IKonyObjectSyncprimaryKeyValueMap - of record only for which rollback should happensyncCallback - for success and error callbackspublic void markForUpload(Map<String,Object> options, KNYCallback syncCallback) throws Exception
IKonyObjectSyncmarkForUpload in interface IKonyObjectSyncoptions - - Primary key of record, markforUploadsyncCallback - - success or error callback.
                     Success call back returns true.Exceptionpublic void getUploadDeferredRecordKeys(KNYCallback syncCallback) throws Exception
IKonyObjectSyncgetUploadDeferredRecordKeys in interface IKonyObjectSyncsyncCallback - - success or error callback.
                     Success call back returns true.Exceptionpublic void cancelSync(Map<String,Object> options, KNYCallback syncCallback)
IKonyObjectSynccancelSync in interface IKonyObjectSyncoptions - Options for cancellationsyncCallback - For success and error callbackspublic void getBinary(Map<String,Object> options, KNYBinaryDownloadCallback knyBinaryDownloadCallback)
getBinary in interface IKonyObjectSyncoptions - - 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 )