Package io.objectbox.relation
Class RelationInfo<SOURCE,TARGET>
- java.lang.Object
-
- io.objectbox.relation.RelationInfo<SOURCE,TARGET>
-
- All Implemented Interfaces:
java.io.Serializable
@Internal @Immutable public class RelationInfo<SOURCE,TARGET> extends java.lang.Object implements java.io.SerializableMeta info describing a relation including source and target entity.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description io.objectbox.internal.ToManyGetter<TARGET>backlinkToManyGetterFor ToMany relations based on ToMany backlinks (null otherwise).io.objectbox.internal.ToOneGetter<TARGET>backlinkToOneGetterFor ToMany relations based on ToOne backlinks (null otherwise).intrelationIdFor stand-alone to-many relations (0 otherwise).EntityInfo<SOURCE>sourceInfoProperty<?>targetIdPropertyFor relations based on a target ID property (null otherwise).EntityInfo<TARGET>targetInfointtargetRelationIdFor ToMany relations based on ToMany backlinks (0 otherwise).io.objectbox.internal.ToManyGetter<SOURCE>toManyGetterOnly set for ToMany relationsio.objectbox.internal.ToOneGetter<SOURCE>toOneGetterOnly set for ToOne relations
-
Constructor Summary
Constructors Constructor Description RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, int relationId)Stand-alone ToMany.RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, io.objectbox.internal.ToManyGetter<TARGET> backlinkToManyGetter, int targetRelationId)ToMany as a ToMany backlinkRelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, Property<TARGET> targetIdProperty, io.objectbox.internal.ToOneGetter<TARGET> backlinkToOneGetter)ToMany as a ToOne backlinkRelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, Property<SOURCE> targetIdProperty, io.objectbox.internal.ToOneGetter<SOURCE> toOneGetter)ToOne
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisBacklink()java.lang.StringtoString()
-
-
-
Field Detail
-
sourceInfo
public final EntityInfo<SOURCE> sourceInfo
-
targetInfo
public final EntityInfo<TARGET> targetInfo
-
targetIdProperty
public final Property<?> targetIdProperty
For relations based on a target ID property (null otherwise).
-
targetRelationId
public final int targetRelationId
For ToMany relations based on ToMany backlinks (0 otherwise).
-
toOneGetter
public final io.objectbox.internal.ToOneGetter<SOURCE> toOneGetter
Only set for ToOne relations
-
toManyGetter
public final io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter
Only set for ToMany relations
-
backlinkToOneGetter
public final io.objectbox.internal.ToOneGetter<TARGET> backlinkToOneGetter
For ToMany relations based on ToOne backlinks (null otherwise).
-
backlinkToManyGetter
public final io.objectbox.internal.ToManyGetter<TARGET> backlinkToManyGetter
For ToMany relations based on ToMany backlinks (null otherwise).
-
relationId
public final int relationId
For stand-alone to-many relations (0 otherwise).
-
-
Constructor Detail
-
RelationInfo
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, Property<SOURCE> targetIdProperty, io.objectbox.internal.ToOneGetter<SOURCE> toOneGetter)
ToOne
-
RelationInfo
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, Property<TARGET> targetIdProperty, io.objectbox.internal.ToOneGetter<TARGET> backlinkToOneGetter)
ToMany as a ToOne backlink
-
RelationInfo
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, io.objectbox.internal.ToManyGetter<TARGET> backlinkToManyGetter, int targetRelationId)
ToMany as a ToMany backlink
-
RelationInfo
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, int relationId)
Stand-alone ToMany.
-
-