Package dev.morphia.mapping.experimental
Class CollectionReference<C extends java.util.Collection>
- java.lang.Object
-
- dev.morphia.mapping.experimental.MorphiaReference<C>
-
- dev.morphia.mapping.experimental.CollectionReference<C>
-
- Type Parameters:
C-
public abstract class CollectionReference<C extends java.util.Collection> extends MorphiaReference<C>
Developer note. This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static MorphiaReference<?>decode(Datastore datastore, Mapper mapper, MappedField mappedField, java.lang.Class paramType, com.mongodb.DBObject dbObject)Decodes a document in to entitiesjava.lang.Objectencode(Mapper mapper, java.lang.Object value, MappedField field)abstract Cget()booleanisResolved()-
Methods inherited from class dev.morphia.mapping.experimental.MorphiaReference
wrap
-
-
-
-
Method Detail
-
isResolved
public final boolean isResolved()
- Specified by:
isResolvedin classMorphiaReference<C extends java.util.Collection>- Returns:
- true if this reference has already been resolved
-
get
public abstract C get()
- Specified by:
getin classMorphiaReference<C extends java.util.Collection>- Returns:
- returns the referenced entity if it exists. May return null.
-
encode
public java.lang.Object encode(Mapper mapper, java.lang.Object value, MappedField field)
- Specified by:
encodein classMorphiaReference<C extends java.util.Collection>- Parameters:
mapper- the mappervalue- the valuefield- the MappedField- Returns:
- the encoded vale
-
decode
public static MorphiaReference<?> decode(Datastore datastore, Mapper mapper, MappedField mappedField, java.lang.Class paramType, com.mongodb.DBObject dbObject)
Decodes a document in to entities- Parameters:
datastore- the datastoremapper- the mappermappedField- the MappedFieldparamType- the type of the underlying entitydbObject- the DBObject to decode- Returns:
- the entities
-
-