Class CriteriaQueryBuilderImpl<QB extends CriteriaQueryBuilder<QB,RT,QW>,RT,QW extends CriteriaQueryWrapper<RT>>
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.query.QueryBuilderBaseImpl<QB,QW>
ch.tocco.nice2.persist.core.impl.hibernate.query.AbstractCriteriaBuilder<QB,Object[],QW>
ch.tocco.nice2.persist.core.impl.hibernate.query.CriteriaQueryBuilderImpl<QB,RT,QW>
- Type Parameters:
QB
- Type of the actualAbstractCriteriaBuilder
implementation so that it can be returned from the builder methodsRT
- Type that is returned fromCriteriaQueryWrapper.getResultList()
andCriteriaQueryWrapper.uniqueResult()
(might be different than the query type)
- All Implemented Interfaces:
CriteriaQueryBuilder<QB,
,RT, QW> QueryBuilderBase<QB,
QW>
- Direct Known Subclasses:
AbstractPathQueryBuilder
,EntityQueryBuilderImpl
public abstract class CriteriaQueryBuilderImpl<QB extends CriteriaQueryBuilder<QB,RT,QW>,RT,QW extends CriteriaQueryWrapper<RT>>
extends AbstractCriteriaBuilder<QB,Object[],QW>
implements CriteriaQueryBuilder<QB,RT,QW>
An abstract query builder class that adds functionality for when multiple rows are expected (like
ordering, limit and offset).
An instance can be obtained from the
PersistenceService
The return type of CriteriaQuery
is always Object
[] because we might need to expand the selection (because
all order by clauses must be part of the selection of a DISTINCT query).-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
-
Field Summary
Fields inherited from class ch.tocco.nice2.persist.core.impl.hibernate.query.AbstractCriteriaBuilder
criteriaBuilder, jdbcFunctions, parameterProviders, parameters, predicateFactory, query, queryRoot, session, subqueryFactory
Fields inherited from class ch.tocco.nice2.persist.core.impl.hibernate.query.QueryBuilderBaseImpl
collector, conditionFactory, dataModel, fieldResolver, insecureEnabled, interceptors, predicates, queryHints, typeManager
-
Constructor Summary
ConstructorDescriptionCriteriaQueryBuilderImpl
(org.hibernate.Session session, Class<? extends Entity> entityClass, List<QueryBuilderInterceptor> interceptors, TypeManager typeManager, DataModel dataModel, ConditionFactory conditionFactory, FieldResolver fieldResolver, Map<String, JdbcFunction> jdbcFunctions, Map<String, ParameterProvider<?>> parameterProviders, Map<String, ?> queryHints, InsecureOrderPathsRegistry insecureOrderPathsRegistry) -
Method Summary
Modifier and TypeMethodDescriptionaddOrder
(jakarta.persistence.criteria.Order order) applyConfiguration
(QueryConfigurator queryConfigurator) protected QueryBuilderInterceptor.QueryBuilderType
setLimit
(int limit) setOffset
(int offset) Methods inherited from class ch.tocco.nice2.persist.core.impl.hibernate.query.AbstractCriteriaBuilder
addParameter, applyParametersToQuery, createQuery, getCriteriaBuilder, getPredicateFactory, getQueryDistinctStrategy, getQueryRoot, getSubqueryFactory, logNewQueryError
Methods inherited from class ch.tocco.nice2.persist.core.impl.hibernate.query.QueryBuilderBaseImpl
build, doBuild, doInsecure, getPredicates, initializationCompleted, self, where, where, where, where, whereInsecure, whereInsecure, whereInsecure
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.api.hibernate.query.builder.CriteriaQueryBuilder
getQueryRoot
Methods inherited from interface ch.tocco.nice2.persist.core.api.hibernate.query.builder.QueryBuilderBase
addParameter, build, getCriteriaBuilder, getPredicates, getSubqueryFactory, where, where, where, where, whereInsecure, whereInsecure, whereInsecure
-
Field Details
-
ARRAY_EQUIVALENCE
-
-
Constructor Details
-
CriteriaQueryBuilderImpl
public CriteriaQueryBuilderImpl(org.hibernate.Session session, Class<? extends Entity> entityClass, List<QueryBuilderInterceptor> interceptors, TypeManager typeManager, DataModel dataModel, ConditionFactory conditionFactory, FieldResolver fieldResolver, Map<String, JdbcFunction> jdbcFunctions, Map<String, ParameterProvider<?>> parameterProviders, Map<String, ?> queryHints, InsecureOrderPathsRegistry insecureOrderPathsRegistry)
-
-
Method Details
-
getPermission
- Specified by:
getPermission
in classQueryBuilderBaseImpl<QB extends CriteriaQueryBuilder<QB,
RT, QW>, QW extends CriteriaQueryWrapper<RT>>
-
setOffset
- Specified by:
setOffset
in interfaceCriteriaQueryBuilder<QB extends CriteriaQueryBuilder<QB,
RT, QW>, RT, QW extends CriteriaQueryWrapper<RT>>
-
setLimit
- Specified by:
setLimit
in interfaceCriteriaQueryBuilder<QB extends CriteriaQueryBuilder<QB,
RT, QW>, RT, QW extends CriteriaQueryWrapper<RT>>
-
addOrder
- Specified by:
addOrder
in interfaceCriteriaQueryBuilder<QB extends CriteriaQueryBuilder<QB,
RT, QW>, RT, QW extends CriteriaQueryWrapper<RT>>
-
addOrder
- Specified by:
addOrder
in interfaceCriteriaQueryBuilder<QB extends CriteriaQueryBuilder<QB,
RT, QW>, RT, QW extends CriteriaQueryWrapper<RT>>
-
applyConfiguration
- Specified by:
applyConfiguration
in interfaceCriteriaQueryBuilder<QB extends CriteriaQueryBuilder<QB,
RT, QW>, RT, QW extends CriteriaQueryWrapper<RT>>
-