Package dev.morphia.mapping.lazy
Class CGLibLazyProxyFactory
- java.lang.Object
-
- dev.morphia.mapping.lazy.CGLibLazyProxyFactory
-
- All Implemented Interfaces:
LazyProxyFactory
public class CGLibLazyProxyFactory extends java.lang.Object implements LazyProxyFactory
i have to admit, there are plenty of open questions for me on that Key-business...- Author:
- uwe schaefer
-
-
Constructor Summary
Constructors Constructor Description CGLibLazyProxyFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends java.util.Collection>
TcreateListProxy(Datastore datastore, T listToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
Creates a proxy for a List.<T extends java.util.Map>
TcreateMapProxy(Datastore datastore, T mapToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
Creates a proxy for a Map.<T> T
createProxy(Datastore datastore, java.lang.Class<T> targetClass, Key<T> key, boolean ignoreMissing)
Creates a proxy for a Class.
-
-
-
Method Detail
-
createListProxy
public <T extends java.util.Collection> T createListProxy(Datastore datastore, T listToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
Description copied from interface:LazyProxyFactory
Creates a proxy for a List.- Specified by:
createListProxy
in interfaceLazyProxyFactory
- Type Parameters:
T
- the type of the entities- Parameters:
datastore
- the Datastore to use when fetching this referencelistToProxy
- the list to proxyreferenceObjClass
- the type of the referenced objectsignoreMissing
- ignore references that don't exist in the database- Returns:
- the proxy
-
createMapProxy
public <T extends java.util.Map> T createMapProxy(Datastore datastore, T mapToProxy, java.lang.Class referenceObjClass, boolean ignoreMissing)
Description copied from interface:LazyProxyFactory
Creates a proxy for a Map.- Specified by:
createMapProxy
in interfaceLazyProxyFactory
- Type Parameters:
T
- the type of the entities- Parameters:
datastore
- the Datastore to use when fetching this referencemapToProxy
- the map to proxyreferenceObjClass
- the type of the referenced objectsignoreMissing
- ignore references that don't exist in the database- Returns:
- the proxy
-
createProxy
public <T> T createProxy(Datastore datastore, java.lang.Class<T> targetClass, Key<T> key, boolean ignoreMissing)
Description copied from interface:LazyProxyFactory
Creates a proxy for a Class.- Specified by:
createProxy
in interfaceLazyProxyFactory
- Type Parameters:
T
- the type of the entity- Parameters:
datastore
- the Datastore to use when fetching this referencetargetClass
- the referenced object's Classkey
- the Key of the referenceignoreMissing
- ignore references that don't exist in the database- Returns:
- the proxy
-
-