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
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CriteriaBuilderWrapperprotected final DataModelprotected final FieldResolverprotected final List<QueryBuilderInterceptor> protected final Map<String, ParameterProvider<?>> protected final PredicateFactoryprotected final Map<String, AbstractToManySelectionPathHandler.QueryHolder> protected final Stringprotected final EntityModelprotected final com.google.common.collect.Multimap<String, QueryBuilderInterceptor.SelectionInterceptor> protected final org.hibernate.Sessionprotected final TypeManager -
Constructor Summary
ConstructorsConstructorDescriptionAbstractToManySelectionPathHandler(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 voidprocessAdditionalQuery(AbstractToManySelectionPathHandler.QueryHolder queryHolder, List<Path> paths) final voidprocessSelection(SelectionRegistry selectionRegistry) This is called before the query is executed.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:SelectionPathHandlerThis is called before the query is executed. The handler can add all required selection paths to the givenSelectionRegistry.- Specified by:
processSelectionin 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)
-