Package org.hibernate.query.criteria
Interface JpaCriteriaQuery<T>
- All Superinterfaces:
AbstractQuery<T>,CommonAbstractCriteria,CriteriaQuery<T>,CriteriaSelect<T>,JpaCriteriaBase,JpaCriteriaNode,JpaCriteriaSelect<T>,JpaCteContainer,JpaQueryableCriteria<T>,JpaSelectCriteria<T>,Serializable
- All Known Implementing Classes:
CriteriaDefinition,SqmSelectStatement
public interface JpaCriteriaQuery<T>
extends CriteriaQuery<T>, JpaQueryableCriteria<T>, JpaSelectCriteria<T>, JpaCriteriaSelect<T>
Extension of the JPA
CriteriaQuery-
Method Summary
Modifier and TypeMethodDescriptionA query that returns the number of results of this query.A query that returnstrueif this query has any results.distinct(boolean distinct) fetch(Number fetch, FetchClauseType fetchClauseType) fetch(JpaExpression<? extends Number> fetch) fetch(JpaExpression<? extends Number> fetch, FetchClauseType fetchClauseType) <X> JpaRoot<X> from(EntityType<X> entity) <X> JpaRoot<X> getFetch()<E> JpaRoot<? extends E> Get a query root element at the given position with the given type.<E> JpaRoot<? extends E> Get a query root element with the given alias and the given type.Return the roots as a list.groupBy(Expression<?>... grouping) groupBy(List<Expression<?>> grouping) having(Expression<Boolean> restriction) multiselect(Selection<?>... selections) Deprecated.multiselect(List<Selection<?>> selectionList) Deprecated.offset(JpaExpression<? extends Number> offset) <U> JpaSubQuery<U> subquery(EntityType<U> type) where(Expression<Boolean> restriction) Methods inherited from interface jakarta.persistence.criteria.AbstractQuery
getGroupList, getResultType, getRoots, isDistinctMethods inherited from interface jakarta.persistence.criteria.CriteriaQuery
getOrderListMethods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
subqueryMethods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinctMethods inherited from interface org.hibernate.query.criteria.JpaSelectCriteria
from, from, from, getGroupRestriction, getQueryPart, getQuerySpec, getRestriction, getSelection
-
Method Details
-
createCountQuery
JpaCriteriaQuery<Long> createCountQuery()A query that returns the number of results of this query.- Since:
- 6.4
- See Also:
-
createExistsQuery
A query that returnstrueif this query has any results.- Since:
- 7.1
-
getOffset
JpaExpression<Number> getOffset() -
offset
-
offset
-
getFetch
JpaExpression<Number> getFetch() -
fetch
-
fetch
-
fetch
-
fetch
-
getFetchClauseType
FetchClauseType getFetchClauseType() -
getRootList
Return the roots as a list. -
getRoot
Get a query root element at the given position with the given type.- Parameters:
position- the position of this root elementtype- the type of the root entity- Throws:
IllegalArgumentException- if the root entity at the given position is not of the given type, or if there are not enough root entities in the query
-
getRoot
Get a query root element with the given alias and the given type.- Parameters:
alias- the identification variable of the root elementtype- the type of the root entity- Throws:
IllegalArgumentException- if the root entity with the given alias is not of the given type, or if there is no root entities with the given alias
-
getParameters
Set<ParameterExpression<?>> getParameters()- Specified by:
getParametersin interfaceCommonAbstractCriteria- API Note:
- Warning! This actually walks the criteria tree looking for parameters nodes.
-
from
- Specified by:
fromin interfaceAbstractQuery<T>- Specified by:
fromin interfaceJpaSelectCriteria<T>
-
from
- Specified by:
fromin interfaceAbstractQuery<T>- Specified by:
fromin interfaceJpaSelectCriteria<T>
-
distinct
- Specified by:
distinctin interfaceAbstractQuery<T>- Specified by:
distinctin interfaceCriteriaQuery<T>- Specified by:
distinctin interfaceJpaSelectCriteria<T>
-
select
- Specified by:
selectin interfaceCriteriaQuery<T>
-
multiselect
Deprecated.- Specified by:
multiselectin interfaceCriteriaQuery<T>
-
multiselect
Deprecated.- Specified by:
multiselectin interfaceCriteriaQuery<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceCriteriaQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceCriteriaQuery<T>- Specified by:
wherein interfaceJpaSelectCriteria<T>
-
where
- Specified by:
wherein interfaceAbstractQuery<T>- Specified by:
wherein interfaceCriteriaQuery<T>
-
groupBy
- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceCriteriaQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>
-
groupBy
- Specified by:
groupByin interfaceAbstractQuery<T>- Specified by:
groupByin interfaceCriteriaQuery<T>- Specified by:
groupByin interfaceJpaSelectCriteria<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceCriteriaQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceCriteriaQuery<T>- Specified by:
havingin interfaceJpaSelectCriteria<T>
-
having
- Specified by:
havingin interfaceAbstractQuery<T>- Specified by:
havingin interfaceCriteriaQuery<T>
-
orderBy
- Specified by:
orderByin interfaceCriteriaQuery<T>
-
orderBy
- Specified by:
orderByin interfaceCriteriaQuery<T>
-
subquery
- Specified by:
subqueryin interfaceCommonAbstractCriteria
-
getCriteriaBuilder
HibernateCriteriaBuilder getCriteriaBuilder()
-