Package dev.morphia.mapping.experimental
Class SingleReference<T>
- java.lang.Object
-
- dev.morphia.mapping.experimental.MorphiaReference<T>
-
- dev.morphia.mapping.experimental.SingleReference<T>
-
- Type Parameters:
T-
@MorphiaInternal @Deprecated(forRemoval=true, since="2.3") public class SingleReference<T> extends MorphiaReference<T>
Deprecated, for removal: This API element is subject to removal in a future version.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 SingleReference(Datastore datastore, Mapper mapper, EntityModel entityModel, Object id)Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MorphiaReference<?>decode(Datastore datastore, Mapper mapper, PropertyModel mappedField, Class<?> paramType, Document document)Deprecated, for removal: This API element is subject to removal in a future version.Decodes a document in to an entityTget()Deprecated, for removal: This API element is subject to removal in a future version.List<Object>getIds()Deprecated, for removal: This API element is subject to removal in a future version.Class<T>getType()Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class dev.morphia.mapping.experimental.MorphiaReference
equals, getDatastore, getMapper, hashCode, ignoreMissing, ignoreMissing, isResolved, resolve, toString, wrap
-
-
-
-
Constructor Detail
-
SingleReference
@MorphiaInternal public SingleReference(Datastore datastore, Mapper mapper, EntityModel entityModel, Object id)
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
datastore- the datastore to usemapper- the mapper to useentityModel- the entity's mapped classid- the ID value
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 MorphiaReference<?> decode(Datastore datastore, Mapper mapper, PropertyModel mappedField, Class<?> paramType, Document document)
Deprecated, for removal: This API element is subject to removal in a future version.Decodes a document in to an entity- Parameters:
datastore- the datastoremapper- the mappermappedField- the MappedFieldparamType- the type of the underlying entitydocument- the Document to decode- Returns:
- the entity
-
get
public T get()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getin classMorphiaReference<T>- Returns:
- returns the referenced entity if it exists. May return null.
-
getIds
public List<Object> getIds()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getIdsin classMorphiaReference<T>- Returns:
- the referenced IDs
-
getType
public Class<T> getType()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getTypein classMorphiaReference<T>- Returns:
- the referenced type
-
-