|Enum Constant and Description|
With this flag enabled, fields will not be written to the Realm file if they contain the same value as the value already present in the Realm.
|Modifier and Type||Method and Description|
Returns the enum constant of this type with the specified name.
Returns an array containing the constants of this enum type, in the order they are declared.
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final ImportFlag CHECK_SAME_VALUES_BEFORE_SET
For local Realms this only has an impact on change listeners which will not report changes to those fields that was not written.
For synchronized Realms this also impacts the server, which will see improved performance as there is less changes to upload and merge into the server Realm.
It also impact how the server merges changes from different devices. Realm uses a last-write-wins approach when merging individual fields in an object, so if a field is not written it will be considered "older" than other fields modified.
public static ImportFlag values()
for (ImportFlag c : ImportFlag.values()) System.out.println(c);
public static ImportFlag valueOf(String name)