Class SubqueryBuilderImpl<T>
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.query.QueryBuilderBaseImpl<SubqueryBuilder<T>,jakarta.persistence.criteria.Subquery<T>>
ch.tocco.nice2.persist.core.impl.hibernate.query.SubqueryBuilderImpl<T>
- All Implemented Interfaces:
QueryBuilderBase<SubqueryBuilder<T>,
,jakarta.persistence.criteria.Subquery<T>> SubqueryBuilder<T>
public class SubqueryBuilderImpl<T>
extends QueryBuilderBaseImpl<SubqueryBuilder<T>,jakarta.persistence.criteria.Subquery<T>>
implements SubqueryBuilder<T>
A query builder for
Subquery
.
Instances of this class are returned from PredicateBuilder.SubqueryFactory
.-
Field Summary
Fields inherited from class ch.tocco.nice2.persist.core.impl.hibernate.query.QueryBuilderBaseImpl
collector, conditionFactory, dataModel, fieldResolver, insecureEnabled, interceptors, predicates, queryHints, typeManager
-
Constructor Summary
ConstructorDescriptionSubqueryBuilderImpl
(TypeManager typeManager, DataModel dataModel, ConditionFactory conditionFactory, FieldResolver fieldResolver, List<QueryBuilderInterceptor> interceptors, jakarta.persistence.criteria.Subquery<T> subquery, jakarta.persistence.criteria.From<?, ?> root, CriteriaBuilderWrapper criteriaBuilder, PredicateBuilder.SubqueryFactory subqueryFactory, PredicateFactory predicateFactory, ParameterCollector parameterCollector, AtomicBoolean insecureAllowed) -
Method Summary
Modifier and TypeMethodDescriptionaddParameter
(String name, Object value) If a condition with an explicit parameter expression was added to the query, this method can be used to set the parameter values.protected jakarta.persistence.criteria.Subquery
<T> doBuild()
protected QueryBuilderInterceptor.QueryBuilderType
protected PredicateFactory
jakarta.persistence.criteria.From
<?, ?> protected SubqueryBuilderImpl
<T> self()
setSelection
(jakarta.persistence.criteria.Expression<T> selection) Methods inherited from class ch.tocco.nice2.persist.core.impl.hibernate.query.QueryBuilderBaseImpl
build, doInsecure, getPredicates, initializationCompleted, 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.QueryBuilderBase
build, getPredicates, where, where, where, where, whereInsecure, whereInsecure, whereInsecure
-
Constructor Details
-
SubqueryBuilderImpl
public SubqueryBuilderImpl(TypeManager typeManager, DataModel dataModel, ConditionFactory conditionFactory, FieldResolver fieldResolver, List<QueryBuilderInterceptor> interceptors, jakarta.persistence.criteria.Subquery<T> subquery, jakarta.persistence.criteria.From<?, ?> root, CriteriaBuilderWrapper criteriaBuilder, PredicateBuilder.SubqueryFactory subqueryFactory, PredicateFactory predicateFactory, ParameterCollector parameterCollector, AtomicBoolean insecureAllowed)
-
-
Method Details
-
self
- Specified by:
self
in classQueryBuilderBaseImpl<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>>
-
setSelection
- Specified by:
setSelection
in interfaceSubqueryBuilder<T>
- Parameters:
selection
- the selection that should be returned from the subquery.
-
getPermission
- Specified by:
getPermission
in classQueryBuilderBaseImpl<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>>
-
getCriteriaBuilder
- Specified by:
getCriteriaBuilder
in interfaceQueryBuilderBase<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>> - Returns:
- the
CriteriaBuilder
that can be used to create conditions that can be passed toQueryBuilderBase.where(Predicate...)
-
getQueryRoot
public jakarta.persistence.criteria.From<?,?> getQueryRoot()- Specified by:
getQueryRoot
in interfaceQueryBuilderBase<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>> - Returns:
- the
Root
orJoin
instance that represents the root entity of the query
-
getSubqueryFactory
- Specified by:
getSubqueryFactory
in interfaceQueryBuilderBase<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>> - Returns:
- an instance of
PredicateBuilder.SubqueryFactory
that can be used to create subqueries
-
addParameter
Description copied from interface:QueryBuilderBase
If a condition with an explicit parameter expression was added to the query, this method can be used to set the parameter values.- Specified by:
addParameter
in interfaceQueryBuilderBase<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>>
-
getPredicateFactory
- Specified by:
getPredicateFactory
in classQueryBuilderBaseImpl<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>>
-
doBuild
- Specified by:
doBuild
in classQueryBuilderBaseImpl<SubqueryBuilder<T>,
jakarta.persistence.criteria.Subquery<T>>
-