Package io.objectbox.model
Class ModelProperty
java.lang.Object
io.objectbox.flatbuffers.Table
io.objectbox.model.ModelProperty
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription__assign(int _i, ByteBuffer _bb) void__init(int _i, ByteBuffer _bb) static voidaddFlags(FlatBufferBuilder builder, long flags) static voidaddHnswParams(FlatBufferBuilder builder, int hnswParamsOffset) static voidaddId(FlatBufferBuilder builder, int idOffset) static voidaddIndexId(FlatBufferBuilder builder, int indexIdOffset) static voidaddMaxIndexValueLength(FlatBufferBuilder builder, long maxIndexValueLength) static voidaddName(FlatBufferBuilder builder, int nameOffset) static voidaddNameSecondary(FlatBufferBuilder builder, int nameSecondaryOffset) static voidaddTargetEntity(FlatBufferBuilder builder, int targetEntityOffset) static voidaddType(FlatBufferBuilder builder, int type) static voidaddVirtualTarget(FlatBufferBuilder builder, int virtualTargetOffset) static intendModelProperty(FlatBufferBuilder builder) longflags()bit flags: e.g.static ModelPropertystatic ModelPropertygetRootAsModelProperty(ByteBuffer _bb, ModelProperty obj) For float vectors properties and nearest neighbor search, you can index the property with HNSW.hnswParams(HnswParams obj) id()indexId()longFor value-based indexes, this defines the maximum length of the value stored for indexingname()Secondary name ignored by core; e.g.static voidstartModelProperty(FlatBufferBuilder builder) For relations only: name of the target entity (will be replaced by "target entity ID" at the schema level)inttype()static voidThis will probably move out of the core model into something binding specific.Methods inherited from class io.objectbox.flatbuffers.Table
__has_identifier, __indirect, __indirect, __offset, __offset, __reset, __reset, __string, __string, __union, __union, __vector, __vector_as_bytebuffer, __vector_in_bytebuffer, __vector_len, compareStrings, compareStrings, getByteBuffer, keysCompare, sortTables
-
Constructor Details
-
ModelProperty
public ModelProperty()
-
-
Method Details
-
ValidateVersion
public static void ValidateVersion() -
getRootAsModelProperty
-
getRootAsModelProperty
-
__init
-
__assign
-
id
-
id
-
name
-
nameAsByteBuffer
-
nameInByteBuffer
-
type
public int type() -
flags
public long flags()bit flags: e.g. indexed, not-nullable -
indexId
-
indexId
-
targetEntity
For relations only: name of the target entity (will be replaced by "target entity ID" at the schema level) -
targetEntityAsByteBuffer
-
targetEntityInByteBuffer
-
virtualTarget
This will probably move out of the core model into something binding specific. A virtual property's "target name" typically references an existing field in the entity at the language level of the binding. In contrast to this, the virtual property (via model "name") does not exist in the entity at the language level (thus virtual), but in ObjectBox's core DB. Example: consider a Java entity which has a ToOne (a Java specific relation wrapper) member called "parent". ObjectBox core is unaware of that ToOne, but works with the "parentId" relation property, which in turn does not exist in the Java entity. The mapping between "parentId" and "parent" is done by our JNI binding. -
virtualTargetAsByteBuffer
-
virtualTargetInByteBuffer
-
nameSecondary
Secondary name ignored by core; e.g. may reference a binding specific name (e.g. Java property) -
nameSecondaryAsByteBuffer
-
nameSecondaryInByteBuffer
-
maxIndexValueLength
public long maxIndexValueLength()For value-based indexes, this defines the maximum length of the value stored for indexing -
hnswParams
For float vectors properties and nearest neighbor search, you can index the property with HNSW. This is the configuration for the HNSW index, e.g. dimensions and parameters affecting quality/speed tradeoff. -
hnswParams
-
startModelProperty
-
addId
-
addName
-
addType
-
addFlags
-
addIndexId
-
addTargetEntity
-
addVirtualTarget
-
addNameSecondary
-
addMaxIndexValueLength
-
addHnswParams
-
endModelProperty
-