Package dev.morphia.mapping.experimental
Class MapReference<T>
- java.lang.Object
-
- dev.morphia.mapping.experimental.MorphiaReference<java.util.Map<java.lang.String,T>>
-
- dev.morphia.mapping.experimental.MapReference<T>
-
- Type Parameters:
T-
public class MapReference<T> extends MorphiaReference<java.util.Map<java.lang.String,T>>
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 Concrete Methods Modifier and Type Method Description static MapReferencedecode(Datastore datastore, Mapper mapper, MappedField mappedField, com.mongodb.DBObject dbObject)Decodes a document in to entitiesjava.lang.Objectencode(Mapper mapper, java.lang.Object value, MappedField field)java.util.Map<java.lang.String,T>get()booleanisResolved()-
Methods inherited from class dev.morphia.mapping.experimental.MorphiaReference
wrap
-
-
-
-
Method Detail
-
get
public java.util.Map<java.lang.String,T> get()
- Specified by:
getin classMorphiaReference<java.util.Map<java.lang.String,T>>- Returns:
- returns the referenced entity if it exists. May return null.
-
isResolved
public boolean isResolved()
- Specified by:
isResolvedin classMorphiaReference<java.util.Map<java.lang.String,T>>- Returns:
- true if this reference has already been resolved
-
encode
public java.lang.Object encode(Mapper mapper, java.lang.Object value, MappedField field)
- Specified by:
encodein classMorphiaReference<java.util.Map<java.lang.String,T>>- Parameters:
mapper- the mappervalue- the valuefield- the MappedField- Returns:
- the encoded vale
-
decode
public static MapReference decode(Datastore datastore, Mapper mapper, MappedField mappedField, com.mongodb.DBObject dbObject)
Decodes a document in to entities- Parameters:
datastore- the datastoremapper- the mappermappedField- the MappedFielddbObject- the DBObject to decode- Returns:
- the entities
-
-