Package io.objectbox.model
Class PropertyFlags
- java.lang.Object
-
- io.objectbox.model.PropertyFlags
-
public final class PropertyFlags extends java.lang.ObjectBit-flags defining the behavior of properties. Note: Numbers indicate the bit position
-
-
Field Summary
Fields Modifier and Type Field Description static intEXPIRATION_TIMEIf a date property has this flag (max.static intID64 bit long property (internally unsigned) representing the ID of the entity.static intID_COMPANIONBy defining an ID companion property, a special ID encoding scheme is activated involving this property.static intID_MONOTONIC_SEQUENCEUnused yet: Use a persisted sequence to enforce ID to rise monotonic (no ID reuse)static intID_SELF_ASSIGNABLEAllow IDs to be assigned by the developerstatic intINDEX_HASHIndex uses a 32 bit hash instead of the value.static intINDEX_HASH64Index uses a 64 bit hash instead of the value.static intINDEX_PARTIAL_SKIP_NULLUnused yetstatic intINDEX_PARTIAL_SKIP_ZEROUnused yet in user land.static intINDEXEDstatic intNON_PRIMITIVE_TYPEOn languages like Java, a non-primitive type is used (aka wrapper types, allowing null)static intNOT_NULLUnused yetstatic intRESERVEDUnused yetstatic intUNIQUEUnique indexstatic intUNIQUE_ON_CONFLICT_REPLACEUnique on-conflict strategy: the object being put replaces any existing conflicting object (deletes it).static intUNSIGNEDUnused yet: While our default are signed ints, queries and indexes need do know signing info.static intVIRTUALVirtual properties may not have a dedicated field in their entity class, e.g.
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertyFlags()
-
-
-
Field Detail
-
ID
public static final int ID
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.- See Also:
- Constant Field Values
-
NON_PRIMITIVE_TYPE
public static final int NON_PRIMITIVE_TYPE
On languages like Java, a non-primitive type is used (aka wrapper types, allowing null)- See Also:
- Constant Field Values
-
NOT_NULL
public static final int NOT_NULL
Unused yet- See Also:
- Constant Field Values
-
INDEXED
public static final int INDEXED
- See Also:
- Constant Field Values
-
RESERVED
public static final int RESERVED
Unused yet- See Also:
- Constant Field Values
-
UNIQUE
public static final int UNIQUE
Unique index- See Also:
- Constant Field Values
-
ID_MONOTONIC_SEQUENCE
public static final int ID_MONOTONIC_SEQUENCE
Unused yet: Use a persisted sequence to enforce ID to rise monotonic (no ID reuse)- See Also:
- Constant Field Values
-
ID_SELF_ASSIGNABLE
public static final int ID_SELF_ASSIGNABLE
Allow IDs to be assigned by the developer- See Also:
- Constant Field Values
-
INDEX_PARTIAL_SKIP_NULL
public static final int INDEX_PARTIAL_SKIP_NULL
Unused yet- See Also:
- Constant Field Values
-
INDEX_PARTIAL_SKIP_ZERO
public static final int INDEX_PARTIAL_SKIP_ZERO
Unused yet in user land. Used internally by relations for 1) backlinks and 2) to clear references to deleted objects (required for ID reuse).- See Also:
- Constant Field Values
-
VIRTUAL
public static final int VIRTUAL
Virtual properties may not have a dedicated field in their entity class, e.g. target IDs of to-one relations- See Also:
- Constant Field Values
-
INDEX_HASH
public static final int INDEX_HASH
Index uses a 32 bit hash instead of the value. 32 bit is the default hash size because: they take less disk space, run well on 32 bit systems, and also run quite well on 64 bit systems (especially for small to medium sized values). and should be OK even with a few collisions.- See Also:
- Constant Field Values
-
INDEX_HASH64
public static final int INDEX_HASH64
Index uses a 64 bit hash instead of the value. Recommended mostly for 64 bit machines with values longer than 200 bytes; small values are faster with a 32 bit hash even on 64 bit machines.- See Also:
- Constant Field Values
-
UNSIGNED
public static final int UNSIGNED
Unused yet: While our default are signed ints, queries and indexes need do know signing info. Note: Don't combine with ID (IDs are always unsigned internally).- See Also:
- Constant Field Values
-
ID_COMPANION
public static final int ID_COMPANION
By defining an ID companion property, a special ID encoding scheme is activated involving this property. For Time Series IDs, a companion property of type Date or DateNano represents the exact timestamp. (In the future, ID companion string properties may be added as another supported type).- See Also:
- Constant Field Values
-
UNIQUE_ON_CONFLICT_REPLACE
public static final int UNIQUE_ON_CONFLICT_REPLACE
Unique on-conflict strategy: the object being put replaces any existing conflicting object (deletes it).- See Also:
- Constant Field Values
-
EXPIRATION_TIME
public static final int EXPIRATION_TIME
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 deleted. There's no strict guarantee when the deletion happens. However, the deletion process can be triggered by an API call.- See Also:
- Constant Field Values
-
-