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.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, isDistinct
Methods inherited from interface jakarta.persistence.criteria.CriteriaQuery
getOrderList
Methods inherited from interface org.hibernate.query.criteria.JpaCriteriaBase
subquery
Methods inherited from interface org.hibernate.query.criteria.JpaCteContainer
getCteCriteria, getCteCriterias, with, with, withRecursiveUnionAll, withRecursiveUnionAll, withRecursiveUnionDistinct, withRecursiveUnionDistinct
Methods 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:
-
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:
getParameters
in interfaceCommonAbstractCriteria
- API Note:
- Warning! This actually walks the criteria tree looking for parameters nodes.
-
from
- Specified by:
from
in interfaceAbstractQuery<T>
- Specified by:
from
in interfaceJpaSelectCriteria<T>
-
from
- Specified by:
from
in interfaceAbstractQuery<T>
- Specified by:
from
in interfaceJpaSelectCriteria<T>
-
distinct
- Specified by:
distinct
in interfaceAbstractQuery<T>
- Specified by:
distinct
in interfaceCriteriaQuery<T>
- Specified by:
distinct
in interfaceJpaSelectCriteria<T>
-
select
- Specified by:
select
in interfaceCriteriaQuery<T>
-
multiselect
Deprecated.- Specified by:
multiselect
in interfaceCriteriaQuery<T>
-
multiselect
Deprecated.- Specified by:
multiselect
in interfaceCriteriaQuery<T>
-
where
- Specified by:
where
in interfaceAbstractQuery<T>
- Specified by:
where
in interfaceCriteriaQuery<T>
- Specified by:
where
in interfaceJpaSelectCriteria<T>
-
where
- Specified by:
where
in interfaceAbstractQuery<T>
- Specified by:
where
in interfaceCriteriaQuery<T>
- Specified by:
where
in interfaceJpaSelectCriteria<T>
-
where
- Specified by:
where
in interfaceAbstractQuery<T>
- Specified by:
where
in interfaceCriteriaQuery<T>
-
groupBy
- Specified by:
groupBy
in interfaceAbstractQuery<T>
- Specified by:
groupBy
in interfaceCriteriaQuery<T>
- Specified by:
groupBy
in interfaceJpaSelectCriteria<T>
-
groupBy
- Specified by:
groupBy
in interfaceAbstractQuery<T>
- Specified by:
groupBy
in interfaceCriteriaQuery<T>
- Specified by:
groupBy
in interfaceJpaSelectCriteria<T>
-
having
- Specified by:
having
in interfaceAbstractQuery<T>
- Specified by:
having
in interfaceCriteriaQuery<T>
- Specified by:
having
in interfaceJpaSelectCriteria<T>
-
having
- Specified by:
having
in interfaceAbstractQuery<T>
- Specified by:
having
in interfaceCriteriaQuery<T>
- Specified by:
having
in interfaceJpaSelectCriteria<T>
-
having
- Specified by:
having
in interfaceAbstractQuery<T>
- Specified by:
having
in interfaceCriteriaQuery<T>
-
orderBy
- Specified by:
orderBy
in interfaceCriteriaQuery<T>
-
orderBy
- Specified by:
orderBy
in interfaceCriteriaQuery<T>
-
subquery
- Specified by:
subquery
in interfaceCommonAbstractCriteria
-
getCriteriaBuilder
HibernateCriteriaBuilder getCriteriaBuilder()
-