OBXPropertyFlags class abstract

Bit-flags defining the behavior of properties. Note: Numbers indicate the bit position

Constructors

OBXPropertyFlags()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

EXPIRATION_TIME → const int
If a date property has this flag (max. one per entity type), the date value specifies the time by which the object expires, at which point it MAY be removed (deleted), which can be triggered by an API call.
ID → const int
64 bit long property (internally unsigned) representing the ID of the entity. May be combined with: NON_PRIMITIVE_TYPE, ID_MONOTONIC_SEQUENCE, ID_SELF_ASSIGNABLE.
ID_COMPANION → const int
By defining an ID companion property, a special ID encoding scheme is activated involving this property.
ID_MONOTONIC_SEQUENCE → const int
Unused yet: Use a persisted sequence to enforce ID to rise monotonic (no ID reuse)
ID_SELF_ASSIGNABLE → const int
Allow IDs to be assigned by the developer
INDEX_HASH → const int
Index uses a 32 bit hash instead of the value 32 bits is shorter on disk, runs well on 32 bit systems, and should be OK even with a few collisions
INDEX_HASH64 → const int
Index uses a 64 bit hash instead of the value recommended mostly for 64 bit machines with values longer >200 bytes; small values are faster with a 32 bit hash
INDEX_PARTIAL_SKIP_NULL → const int
Unused yet
INDEX_PARTIAL_SKIP_ZERO → const int
Used by References for 1) back-references and 2) to clear references to deleted objects (required for ID reuse)
INDEXED → const int
NON_PRIMITIVE_TYPE → const int
On languages like Java, a non-primitive type is used (aka wrapper types, allowing null)
NOT_NULL → const int
Unused yet
RESERVED → const int
Unused yet
SYNC_CLOCK → const int
Marks a Long (64-bit integer) property as the sync clock, a "hybrid logical clock" to resolve Sync conflicts. These clock values allow "last write wins" conflict resolution. There can be only one sync clock per sync entity type; which is also recommended for basic conflict resolution. For new objects, initialize a property value to 0 to reserve "a slot" in the object data. ObjectBox Sync will update this property automatically on put operations. As a hybrid clock, it combines a wall clock with a logical counter to compensate for some clock skew effects.
SYNC_PRECEDENCE → const int
Marks a Long (64-bit integer) property as the "sync precedence" to customize Sync conflict resolution. Developer-assigned precedence values are then used to resolve conflicts via "higher precedence wins". Defining and assigning precedence values are completely in the hands of the developer (the ObjectBox user). There can be only one sync precedence per sync entity type. Typically, it is combined with a sync clock, with the latter being the tie-breaker for equal precedence values.
UNIQUE → const int
Unique index
UNIQUE_ON_CONFLICT_REPLACE → const int
Unique on-conflict strategy: the object being put replaces any existing conflicting object (deletes it).
UNSIGNED → const int
The actual type of the variable is unsigned (used in combination with numeric OBXPropertyType_*). While our default are signed ints, queries & indexes need do know signing info. Note: Don't combine with ID (IDs are always unsigned internally).
VIRTUAL → const int
Virtual properties may not have a dedicated field in their entity class, e.g. target IDs of to-one relations