Class DLoadContext
- java.lang.Object
-
- io.ebeaninternal.server.loadcontext.DLoadContext
-
- All Implemented Interfaces:
LoadContext
public class DLoadContext extends Object implements LoadContext
Default implementation of LoadContext.
-
-
Constructor Summary
Constructors Constructor Description DLoadContext(OrmQueryRequest<?> request, SpiQuerySecondary secondaryQueries)
DLoadContext(BeanDescriptor<?> rootDescriptor, PersistenceContext persistenceContext)
Construct for use with JSON marshalling (doc store).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeSecondaryQueries(OrmQueryRequest<?> parentRequest, boolean forEach)
Execute all the secondary queries.ObjectGraphNode
getObjectGraphNode(String path)
Return the node for a given path which is used by AutoTune profiling.PersistenceContext
getPersistenceContext()
Return the persistence context used by this query and future lazy loading.ProfileLocation
getProfileLocation()
Return the profile location of the origin query.int
getSecondaryQueriesMinBatchSize(int defaultQueryBatch)
Return the minimum batch size when using QueryIterator with query joins.void
register(String path, BeanCollection<?> bc)
Register a collection for lazy loading.void
register(String path, EntityBeanIntercept ebi)
Register a Bean for lazy loading.void
register(String path, EntityBeanIntercept ebi, BeanPropertyAssocOne<?> property)
Register a Bean with inheritance.void
resetPersistenceContext(PersistenceContext persistenceContext)
Set the persistence context used by this query and future lazy loading.
-
-
-
Constructor Detail
-
DLoadContext
public DLoadContext(BeanDescriptor<?> rootDescriptor, PersistenceContext persistenceContext)
Construct for use with JSON marshalling (doc store).
-
DLoadContext
public DLoadContext(OrmQueryRequest<?> request, SpiQuerySecondary secondaryQueries)
-
-
Method Detail
-
getProfileLocation
public ProfileLocation getProfileLocation()
Return the profile location of the origin query.
-
getSecondaryQueriesMinBatchSize
public int getSecondaryQueriesMinBatchSize(int defaultQueryBatch)
Return the minimum batch size when using QueryIterator with query joins.- Specified by:
getSecondaryQueriesMinBatchSize
in interfaceLoadContext
-
executeSecondaryQueries
public void executeSecondaryQueries(OrmQueryRequest<?> parentRequest, boolean forEach)
Execute all the secondary queries.- Specified by:
executeSecondaryQueries
in interfaceLoadContext
- Parameters:
parentRequest
- the originating query requestforEach
- set true when using findEach iteration
-
getObjectGraphNode
public ObjectGraphNode getObjectGraphNode(String path)
Description copied from interface:LoadContext
Return the node for a given path which is used by AutoTune profiling.- Specified by:
getObjectGraphNode
in interfaceLoadContext
-
getPersistenceContext
public PersistenceContext getPersistenceContext()
Description copied from interface:LoadContext
Return the persistence context used by this query and future lazy loading.- Specified by:
getPersistenceContext
in interfaceLoadContext
-
resetPersistenceContext
public void resetPersistenceContext(PersistenceContext persistenceContext)
Description copied from interface:LoadContext
Set the persistence context used by this query and future lazy loading.Used by query iterator when processing large result sets.
- Specified by:
resetPersistenceContext
in interfaceLoadContext
-
register
public void register(String path, EntityBeanIntercept ebi)
Description copied from interface:LoadContext
Register a Bean for lazy loading.- Specified by:
register
in interfaceLoadContext
-
register
public void register(String path, EntityBeanIntercept ebi, BeanPropertyAssocOne<?> property)
Description copied from interface:LoadContext
Register a Bean with inheritance.- Specified by:
register
in interfaceLoadContext
-
register
public void register(String path, BeanCollection<?> bc)
Description copied from interface:LoadContext
Register a collection for lazy loading.- Specified by:
register
in interfaceLoadContext
-
-