Package dev.morphia.mapping.lazy.proxy
Class CollectionObjectReference<T>
- java.lang.Object
-
- dev.morphia.mapping.lazy.proxy.AbstractReference
-
- dev.morphia.mapping.lazy.proxy.CollectionObjectReference<T>
-
- Type Parameters:
T- the type of the proxied items
- All Implemented Interfaces:
com.thoughtworks.proxy.kit.ObjectReference,ProxiedEntityReferenceList,ProxiedReference,java.io.Serializable
public class CollectionObjectReference<T> extends AbstractReference implements ProxiedEntityReferenceList
A list of proxied elements- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class dev.morphia.mapping.lazy.proxy.AbstractReference
ignoreMissing, object, referenceObjClass
-
-
Constructor Summary
Constructors Constructor Description CollectionObjectReference(java.util.Collection<T> type, java.lang.Class<T> referenceObjClass, boolean ignoreMissing, Datastore datastore)Creates a CollectionObjectReference
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void__add(Key key)void__addAll(java.util.Collection<? extends Key<?>> keys)java.util.List<Key<?>>__getKeysAsList()protected voidbeforeWriteObject()protected java.lang.Objectfetch()-
Methods inherited from class dev.morphia.mapping.lazy.proxy.AbstractReference
__getReferenceObjClass, __isFetched, __unwrap, fetch, get, getDatastore, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.morphia.mapping.lazy.proxy.ProxiedReference
__getReferenceObjClass, __isFetched, __unwrap
-
-
-
-
Constructor Detail
-
CollectionObjectReference
public CollectionObjectReference(java.util.Collection<T> type, java.lang.Class<T> referenceObjClass, boolean ignoreMissing, Datastore datastore)
Creates a CollectionObjectReference- Parameters:
type- the collectionreferenceObjClass- the Class of the referenced objectsignoreMissing- ignore missing referenced documentsdatastore- the Datastore to use when fetching this reference
-
-
Method Detail
-
__add
public void __add(Key key)
- Specified by:
__addin interfaceProxiedEntityReferenceList
-
__addAll
public void __addAll(java.util.Collection<? extends Key<?>> keys)
- Specified by:
__addAllin interfaceProxiedEntityReferenceList
-
__getKeysAsList
public java.util.List<Key<?>> __getKeysAsList()
- Specified by:
__getKeysAsListin interfaceProxiedEntityReferenceList
-
beforeWriteObject
protected void beforeWriteObject()
- Overrides:
beforeWriteObjectin classAbstractReference
-
fetch
protected java.lang.Object fetch()
- Specified by:
fetchin classAbstractReference
-
-