Class AbstractToManySelectionPathHandler
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.query.selection.AbstractToManySelectionPathHandler
- All Implemented Interfaces:
SelectionPathHandler
- Direct Known Subclasses:
AbstractToManyBinaryHandler
,ToManySelectionPathHandler
public abstract class AbstractToManySelectionPathHandler
extends Object
implements SelectionPathHandler
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CriteriaBuilderWrapper
protected final DataModel
protected final FieldResolver
protected final List
<QueryBuilderInterceptor> protected final Map
<String, ParameterProvider<?>> protected final PredicateFactory
protected final Map
<String, AbstractToManySelectionPathHandler.QueryHolder> protected final String
protected final EntityModel
protected final com.google.common.collect.Multimap
<String, QueryBuilderInterceptor.SelectionInterceptor> protected final org.hibernate.Session
protected final TypeManager
-
Constructor Summary
ConstructorDescriptionAbstractToManySelectionPathHandler
(DataModel dataModel, TypeManager typeManager, FieldResolver fieldResolver, EntityModel rootModel, PredicateFactory predicateFactory, List<QueryBuilderInterceptor> interceptors, org.hibernate.Session session, CriteriaBuilderWrapper criteriaBuilder, Map<String, ParameterProvider<?>> parameterProviders) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.common.collect.Multimap
<Serializable, Object[]> doLoadData
(List<Serializable> allKeys, AbstractToManySelectionPathHandler.QueryHolder queryHolder, String pathWithoutField) protected List
<Serializable> extractAllRootPrimaryKeys
(List<Object[]> queryResults, SelectionRegistry selectionRegistry) Return all primary keys of the root entity that were found by the original query.protected abstract void
processAdditionalQuery
(AbstractToManySelectionPathHandler.QueryHolder queryHolder, List<Path> paths) final void
processSelection
(SelectionRegistry selectionRegistry) This is called before the query is executed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.impl.hibernate.query.selection.SelectionPathHandler
processResults, select, supports
-
Field Details
-
dataModel
-
typeManager
-
fieldResolver
-
rootModel
-
predicateFactory
-
interceptors
-
session
protected final org.hibernate.Session session -
criteriaBuilder
-
parameterProviders
-
paths
-
queries
-
selectionInterceptorMap
protected final com.google.common.collect.Multimap<String,QueryBuilderInterceptor.SelectionInterceptor> selectionInterceptorMap -
rootKeyName
-
-
Constructor Details
-
AbstractToManySelectionPathHandler
public AbstractToManySelectionPathHandler(DataModel dataModel, TypeManager typeManager, FieldResolver fieldResolver, EntityModel rootModel, PredicateFactory predicateFactory, List<QueryBuilderInterceptor> interceptors, org.hibernate.Session session, CriteriaBuilderWrapper criteriaBuilder, Map<String, ParameterProvider<?>> parameterProviders)
-
-
Method Details
-
processSelection
Description copied from interface:SelectionPathHandler
This is called before the query is executed. The handler can add all required selection paths to the givenSelectionRegistry
.- Specified by:
processSelection
in interfaceSelectionPathHandler
-
processAdditionalQuery
protected abstract void processAdditionalQuery(AbstractToManySelectionPathHandler.QueryHolder queryHolder, List<Path> paths) -
extractAllRootPrimaryKeys
protected List<Serializable> extractAllRootPrimaryKeys(List<Object[]> queryResults, SelectionRegistry selectionRegistry) Return all primary keys of the root entity that were found by the original query. These are needed to restrict the additional to-many queries. -
doLoadData
protected com.google.common.collect.Multimap<Serializable,Object[]> doLoadData(List<Serializable> allKeys, AbstractToManySelectionPathHandler.QueryHolder queryHolder, String pathWithoutField)
-