Package io.objectbox.model
Class ModelProperty
- java.lang.Object
-
- io.objectbox.flatbuffers.Table
-
- io.objectbox.model.ModelProperty
-
public final class ModelProperty extends Table
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModelProperty.Vector
-
Constructor Summary
Constructors Constructor Description ModelProperty()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelProperty__assign(int _i, java.nio.ByteBuffer _bb)void__init(int _i, java.nio.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 ModelPropertygetRootAsModelProperty(java.nio.ByteBuffer _bb)static ModelPropertygetRootAsModelProperty(java.nio.ByteBuffer _bb, ModelProperty obj)HnswParamshnswParams()For float vectors properties and nearest neighbor search, you can index the property with HNSW.HnswParamshnswParams(HnswParams obj)IdUidid()IdUidid(IdUid obj)IdUidindexId()IdUidindexId(IdUid obj)longmaxIndexValueLength()For value-based indexes, this defines the maximum length of the value stored for indexingjava.lang.Stringname()java.nio.ByteBuffernameAsByteBuffer()java.nio.ByteBuffernameInByteBuffer(java.nio.ByteBuffer _bb)java.lang.StringnameSecondary()Secondary name ignored by core; e.g.java.nio.ByteBuffernameSecondaryAsByteBuffer()java.nio.ByteBuffernameSecondaryInByteBuffer(java.nio.ByteBuffer _bb)static voidstartModelProperty(FlatBufferBuilder builder)java.lang.StringtargetEntity()For relations only: name of the target entity (will be replaced by "target entity ID" at the schema level)java.nio.ByteBuffertargetEntityAsByteBuffer()java.nio.ByteBuffertargetEntityInByteBuffer(java.nio.ByteBuffer _bb)inttype()static voidValidateVersion()java.lang.StringvirtualTarget()This will probably move out of the core model into something binding specific.java.nio.ByteBuffervirtualTargetAsByteBuffer()java.nio.ByteBuffervirtualTargetInByteBuffer(java.nio.ByteBuffer _bb)-
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
-
-
-
-
Method Detail
-
ValidateVersion
public static void ValidateVersion()
-
getRootAsModelProperty
public static ModelProperty getRootAsModelProperty(java.nio.ByteBuffer _bb)
-
getRootAsModelProperty
public static ModelProperty getRootAsModelProperty(java.nio.ByteBuffer _bb, ModelProperty obj)
-
__init
public void __init(int _i, java.nio.ByteBuffer _bb)
-
__assign
public ModelProperty __assign(int _i, java.nio.ByteBuffer _bb)
-
id
public IdUid id()
-
name
public java.lang.String name()
-
nameAsByteBuffer
public java.nio.ByteBuffer nameAsByteBuffer()
-
nameInByteBuffer
public java.nio.ByteBuffer nameInByteBuffer(java.nio.ByteBuffer _bb)
-
type
public int type()
-
flags
public long flags()
bit flags: e.g. indexed, not-nullable
-
indexId
public IdUid indexId()
-
targetEntity
public java.lang.String targetEntity()
For relations only: name of the target entity (will be replaced by "target entity ID" at the schema level)
-
targetEntityAsByteBuffer
public java.nio.ByteBuffer targetEntityAsByteBuffer()
-
targetEntityInByteBuffer
public java.nio.ByteBuffer targetEntityInByteBuffer(java.nio.ByteBuffer _bb)
-
virtualTarget
public java.lang.String 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
public java.nio.ByteBuffer virtualTargetAsByteBuffer()
-
virtualTargetInByteBuffer
public java.nio.ByteBuffer virtualTargetInByteBuffer(java.nio.ByteBuffer _bb)
-
nameSecondary
public java.lang.String nameSecondary()
Secondary name ignored by core; e.g. may reference a binding specific name (e.g. Java property)
-
nameSecondaryAsByteBuffer
public java.nio.ByteBuffer nameSecondaryAsByteBuffer()
-
nameSecondaryInByteBuffer
public java.nio.ByteBuffer nameSecondaryInByteBuffer(java.nio.ByteBuffer _bb)
-
maxIndexValueLength
public long maxIndexValueLength()
For value-based indexes, this defines the maximum length of the value stored for indexing
-
hnswParams
public HnswParams 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
public HnswParams hnswParams(HnswParams obj)
-
startModelProperty
public static void startModelProperty(FlatBufferBuilder builder)
-
addId
public static void addId(FlatBufferBuilder builder, int idOffset)
-
addName
public static void addName(FlatBufferBuilder builder, int nameOffset)
-
addType
public static void addType(FlatBufferBuilder builder, int type)
-
addFlags
public static void addFlags(FlatBufferBuilder builder, long flags)
-
addIndexId
public static void addIndexId(FlatBufferBuilder builder, int indexIdOffset)
-
addTargetEntity
public static void addTargetEntity(FlatBufferBuilder builder, int targetEntityOffset)
-
addVirtualTarget
public static void addVirtualTarget(FlatBufferBuilder builder, int virtualTargetOffset)
-
addNameSecondary
public static void addNameSecondary(FlatBufferBuilder builder, int nameSecondaryOffset)
-
addMaxIndexValueLength
public static void addMaxIndexValueLength(FlatBufferBuilder builder, long maxIndexValueLength)
-
addHnswParams
public static void addHnswParams(FlatBufferBuilder builder, int hnswParamsOffset)
-
endModelProperty
public static int endModelProperty(FlatBufferBuilder builder)
-
-