Package dev.morphia.mapping.experimental
Class ListReference<T>
- java.lang.Object
-
- dev.morphia.mapping.experimental.MorphiaReference<C>
-
- dev.morphia.mapping.experimental.CollectionReference<List<T>>
-
- dev.morphia.mapping.experimental.ListReference<T>
-
- Type Parameters:
T
-
public class ListReference<T> extends CollectionReference<List<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 ListReference(Datastore datastore, EntityModel model, List ids)
ListReference(List<T> values)
Creates an instance with prepopulated values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<T>
get()
Gets the referenced entities.protected void
setValues(List ids)
-
Methods inherited from class dev.morphia.mapping.experimental.CollectionReference
getIds, getType
-
Methods inherited from class dev.morphia.mapping.experimental.MorphiaReference
equals, hashCode, ignoreMissing, ignoreMissing, isResolved, resolve, toString, wrap
-
-
-
-
Constructor Detail
-
ListReference
public ListReference(Datastore datastore, EntityModel model, List ids)
- Parameters:
datastore
- the datastore to useids
- the IDs of the entitiesmodel
- the EntityModel for 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
-
setValues
protected void setValues(List ids)
-
get
public List<T> get()
Description copied from class:CollectionReference
Gets the referenced entities. This may require at least one request to the server.- Specified by:
get
in classCollectionReference<List<T>>
- Returns:
- the referenced entities
-
-