Package dev.morphia.mapping.experimental
Class MapReference<T>
- java.lang.Object
-
- dev.morphia.mapping.experimental.MorphiaReference<Map<Object,T>>
-
- dev.morphia.mapping.experimental.MapReference<T>
-
- Type Parameters:
T
-
public class MapReference<T> extends MorphiaReference<Map<Object,T>>
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Constructor Summary
Constructors Constructor Description MapReference(Datastore datastore, Map<String,Object> ids, EntityModel entityModel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MapReference
decode(Datastore datastore, Mapper mapper, PropertyModel property, org.bson.Document document)
Decodes a document in to entitiesMap<Object,T>
get()
Map<String,Object>
getId(Mapper mapper, Datastore datastore, EntityModel field)
List<Object>
getIds()
Class<Map<Object,T>>
getType()
-
Methods inherited from class dev.morphia.mapping.experimental.MorphiaReference
equals, hashCode, ignoreMissing, ignoreMissing, isResolved, resolve, toString, wrap
-
-
-
-
Constructor Detail
-
MapReference
public MapReference(Datastore datastore, Map<String,Object> ids, EntityModel entityModel)
- Parameters:
datastore
- the datastore to useids
- the IDs of the entitiesentityModel
- the model of the entity type
Developer note.This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
-
-
Method Detail
-
decode
public static MapReference decode(Datastore datastore, Mapper mapper, PropertyModel property, org.bson.Document document)
Decodes a document in to entities- Parameters:
datastore
- the datastoremapper
- the mapperproperty
- the property modeldocument
- the Document to decode- Returns:
- the entities
-
get
public Map<Object,T> get()
- Specified by:
get
in classMorphiaReference<Map<Object,T>>
- Returns:
- returns the referenced entity if it exists. May return null.
-
getType
public Class<Map<Object,T>> getType()
- Specified by:
getType
in classMorphiaReference<Map<Object,T>>
- Returns:
- the referenced type
-
getIds
public List<Object> getIds()
- Specified by:
getIds
in classMorphiaReference<Map<Object,T>>
- Returns:
- the referenced IDs
-
-