Package dev.morphia.mapping.lazy.proxy
Class MapObjectReference
- java.lang.Object
-
- dev.morphia.mapping.lazy.proxy.AbstractReference
-
- dev.morphia.mapping.lazy.proxy.MapObjectReference
-
- All Implemented Interfaces:
com.thoughtworks.proxy.kit.ObjectReference
,ProxiedEntityReferenceMap
,ProxiedReference
,java.io.Serializable
public class MapObjectReference extends AbstractReference implements ProxiedEntityReferenceMap
- Author:
- Uwe Schaefer, (us@thomas-daily.de)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class dev.morphia.mapping.lazy.proxy.AbstractReference
ignoreMissing, object, referenceObjClass
-
-
Constructor Summary
Constructors Constructor Description MapObjectReference(Datastore datastore, java.util.Map mapToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
Creates a MapObjectReference
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.Object,Key<?>>
__getReferenceMap()
void
__put(java.lang.Object key, Key k)
protected void
beforeWriteObject()
protected java.lang.Object
fetch()
-
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
-
MapObjectReference
public MapObjectReference(Datastore datastore, java.util.Map mapToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
Creates a MapObjectReference- Parameters:
datastore
- the Datastore to use when fetching this referencemapToProxy
- the map to proxyreferenceObjClass
- the referenced objects' ClassignoreMissing
- ignore missing referenced documents
-
-
Method Detail
-
__getReferenceMap
public java.util.Map<java.lang.Object,Key<?>> __getReferenceMap()
- Specified by:
__getReferenceMap
in interfaceProxiedEntityReferenceMap
- Returns:
- the reference map
-
__put
public void __put(java.lang.Object key, Key k)
- Specified by:
__put
in interfaceProxiedEntityReferenceMap
-
beforeWriteObject
protected void beforeWriteObject()
- Overrides:
beforeWriteObject
in classAbstractReference
-
fetch
protected java.lang.Object fetch()
- Specified by:
fetch
in classAbstractReference
-
-