Package apple.cloudkit.enums
Class CKRecordSavePolicy
- java.lang.Object
-
- apple.cloudkit.enums.CKRecordSavePolicy
-
public final class CKRecordSavePolicy extends java.lang.Object[@enum] CKRecordSavePolicy [@constant] CKRecordSaveIfServerRecordUnchanged Locally edited keys are sent to the server, updating the record if the server record has not been modified. This is the default and recommended save policy for regular use. This policy compares the record change tag with the server record, and may return @c CKErrorServerRecordChanged if the server record has been modified, for example by another device. Note: A @c CKShare record is always treated as @c CKRecordSaveIfServerRecordUnchanged, regardless of the @c savePolicy of the operation that modifies the share. [@constant] CKRecordSaveChangedKeys Locally edited keys are written to the server, updating the record even if the server record has been modified. Note: This policy should be used with care, as it can overwrite changes made by other devices. Any previously committed change to the server, for example by other devices, will always be overwritten by the locally changed value. Note: A @c CKShare record is always treated as @c CKRecordSaveIfServerRecordUnchanged, regardless of the @c savePolicy of the operation that modifies the share. For non-CKShare records, this policy does not compare the record change tag and therefore will not return @c CKErrorServerRecordChanged [@constant] CKRecordSaveAllKeys All local keys are written to the server, updating the record even if the server record has been modified. Note: This policy should be used with care. Any previously committed change to the server, for example by other devices, will be overwritten by the local value. Keys present only on the server remain unchanged. There are two common ways in which a server record will contain keys not present locally: 1 - Another client may have added a new key to the record since it was fetched. 2 - If @c desiredKeys was used with the fetch / query that returned this record, only a portion of the record's keys may have been downloaded. Note: A @c CKShare record is always treated as @c CKRecordSaveIfServerRecordUnchanged, regardless of the @c savePolicy of the operation that modifies the share. For non-CKShare records, this policy does not compare the record change tag and therefore will not return @c CKErrorServerRecordChanged API-Since: 8.0
-
-
Field Summary
Fields Modifier and Type Field Description static longAllKeysDoes not compare record change tags API-Since: 8.0static longChangedKeysAPI-Since: 8.0static longIfServerRecordUnchangedAPI-Since: 8.0
-
-
-
Field Detail
-
IfServerRecordUnchanged
public static final long IfServerRecordUnchanged
API-Since: 8.0- See Also:
- Constant Field Values
-
ChangedKeys
public static final long ChangedKeys
API-Since: 8.0- See Also:
- Constant Field Values
-
AllKeys
public static final long AllKeys
Does not compare record change tags API-Since: 8.0- See Also:
- Constant Field Values
-
-