Package dev.morphia.mapping.lazy.proxy
Class EntityObjectReference
- java.lang.Object
-
- dev.morphia.mapping.lazy.proxy.AbstractReference
-
- dev.morphia.mapping.lazy.proxy.EntityObjectReference
-
- All Implemented Interfaces:
com.thoughtworks.proxy.kit.ObjectReference,ProxiedEntityReference,ProxiedReference,java.io.Serializable
public class EntityObjectReference extends AbstractReference implements ProxiedEntityReference
A serializable object reference- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class dev.morphia.mapping.lazy.proxy.AbstractReference
ignoreMissing, object, referenceObjClass
-
-
Constructor Summary
Constructors Constructor Description EntityObjectReference(Datastore datastore, java.lang.Class targetClass, Key key, boolean ignoreMissing)Creates an object reference
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Key__getKey()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
-
EntityObjectReference
public EntityObjectReference(Datastore datastore, java.lang.Class targetClass, Key key, boolean ignoreMissing)
Creates an object reference- Parameters:
datastore- the Datastore to use when fetching this referencetargetClass- the Class of the referenced itemkey- the Key valueignoreMissing- ignore references that don't exist in the database
-
-
Method Detail
-
__getKey
public Key __getKey()
- Specified by:
__getKeyin interfaceProxiedEntityReference
-
beforeWriteObject
protected void beforeWriteObject()
- Overrides:
beforeWriteObjectin classAbstractReference
-
fetch
protected java.lang.Object fetch()
- Specified by:
fetchin classAbstractReference
-
-