@Internal
@Immutable
public class RelationInfo<SOURCE,TARGET>
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
io.objectbox.internal.ToManyGetter<TARGET> |
backlinkToManyGetter
For ToMany relations based on ToMany backlinks (null otherwise).
|
io.objectbox.internal.ToOneGetter<TARGET> |
backlinkToOneGetter
For ToMany relations based on ToOne backlinks (null otherwise).
|
int |
relationId
For stand-alone to-many relations (0 otherwise).
|
EntityInfo<SOURCE> |
sourceInfo |
Property<?> |
targetIdProperty
For relations based on a target ID property (null otherwise).
|
EntityInfo<TARGET> |
targetInfo |
int |
targetRelationId
For ToMany relations based on ToMany backlinks (0 otherwise).
|
io.objectbox.internal.ToManyGetter<SOURCE> |
toManyGetter
Only set for ToMany relations
|
io.objectbox.internal.ToOneGetter<SOURCE> |
toOneGetter
Only set for ToOne relations
|
Constructor and Description |
---|
RelationInfo(EntityInfo<SOURCE> sourceInfo,
EntityInfo<TARGET> targetInfo,
Property<SOURCE> targetIdProperty,
io.objectbox.internal.ToOneGetter<SOURCE> toOneGetter)
ToOne
|
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,
Property<TARGET> targetIdProperty,
io.objectbox.internal.ToOneGetter<TARGET> backlinkToOneGetter)
ToMany as a ToOne backlink
|
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
|
Modifier and Type | Method and Description |
---|---|
boolean |
isBacklink() |
java.lang.String |
toString() |
public final EntityInfo<SOURCE> sourceInfo
public final EntityInfo<TARGET> targetInfo
public final Property<?> targetIdProperty
public final int targetRelationId
public final io.objectbox.internal.ToOneGetter<SOURCE> toOneGetter
public final io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter
public final io.objectbox.internal.ToOneGetter<TARGET> backlinkToOneGetter
public final io.objectbox.internal.ToManyGetter<TARGET> backlinkToManyGetter
public final int relationId
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, Property<SOURCE> targetIdProperty, io.objectbox.internal.ToOneGetter<SOURCE> toOneGetter)
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, Property<TARGET> targetIdProperty, io.objectbox.internal.ToOneGetter<TARGET> backlinkToOneGetter)
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, io.objectbox.internal.ToManyGetter<TARGET> backlinkToManyGetter, int targetRelationId)
public RelationInfo(EntityInfo<SOURCE> sourceInfo, EntityInfo<TARGET> targetInfo, io.objectbox.internal.ToManyGetter<SOURCE> toManyGetter, int relationId)