Package org.hibernate.query.criteria
The JPA-standard criteria query API defines all the operations needed express
any query written in standard JPQL. This package extends the JPA-defined API,
allowing any query written in HQL to be expressed via the criteria API.
The gateway to this functionality is
HibernateCriteriaBuilder
, which extends
CriteriaBuilder
.
Types defined in this package extend the equivalent types in
jakarta.persistence.criteria
with additional operations. For example,
JpaCriteriaQuery
adds the methods:
JpaSelectCriteria.from(Subquery)
, which allows the use of a subquery in thefrom
clause of the query, andJpaCteContainer.with(AbstractQuery)
, which allows the creation ofcommon table expressions
.
The very useful operation HibernateCriteriaBuilder.createQuery(java.lang.String, java.lang.Class)
transforms a given HQL query string to an equivalent criteria query.
The class CriteriaDefinition
is a helpful
utility that makes it easier to construct criteria queries.
-
Interface Summary Interface Description HibernateCriteriaBuilder A JPACriteriaBuilder
is a source of objects which may be composed to express a criteria query.JpaCoalesce<T> JpaCollectionJoin<O,T> Specialization ofJpaJoin
forCollection
typed attribute joinsJpaCompoundSelection<T> JpaCriteriaBase JpaCriteriaDelete<T> JpaCriteriaInsertSelect<T> A representation of SqmInsertSelectStatement at theorg.hibernate.query.criteria
level, even though JPA does not define support for insert-select criteria.JpaCriteriaInsertValues<T> A representation of SqmInsertValuesStatement at theorg.hibernate.query.criteria
level, even though JPA does not define support for insert-values criteria.JpaCriteriaNode Base contract for nodes making up the criteria treeJpaCriteriaQuery<T> Extension of the JPACriteriaQuery
JpaCriteriaUpdate<T> JpaCrossJoin<T> JpaCteContainer Common contract for criteria parts that can hold CTEs (common table expressions).JpaCteCriteria<T> A CTE (common table expression) criteria.JpaCteCriteriaAttribute Describes the attribute of aJpaCteCriteriaType
.JpaCteCriteriaType<T> A CTE (common table expression) criteria type.JpaDerivedFrom<T> JpaDerivedJoin<T> JpaDerivedRoot<T> JpaEntityJoin<T> JpaExpression<T> API extension to the JPAExpression
contractJpaFetch<O,T> JpaFetchParent<O,T> JpaFrom<O,T> API extension to the JPAFrom
contractJpaFunction<T> Contract for expressions which model a SQL function call.JpaInPredicate<T> JpaJoin<O,T> JpaJoinedFrom<O,T> Exists within the hierarchy mainly to support "entity joins".JpaListJoin<O,T> JpaManipulationCriteria<E> JpaMapJoin<O,K,V> JpaOrder JpaParameterExpression<T> JpaPath<T> API extension to the JPAPath
contractJpaPluralJoin<O,C,E> JpaPredicate JpaQueryableCriteria<T> Common contract for the forms of criteria that are "queryable" - can be converted into aQuery
.JpaQueryGroup<T> A query group i.e.JpaQueryPart<T> Models a query part i.e.JpaQueryStructure<T> Models aSELECT
query.JpaRoot<T> JpaSearchedCase<T> JpaSearchOrder Represents the search order for a recursive CTE (common table expression).JpaSelectCriteria<T> Commonality between a JPAJpaCriteriaQuery
andJpaSubQuery
, mainly in the form of delegation toJpaQueryStructure
JpaSelection<T> API extension to the JPASelection
contractJpaSetJoin<O,T> JpaSimpleCase<C,R> JpaSubQuery<T> JpaTupleElement<T> API extension to the JPATupleElement
contractJpaWindow Common contract for window parts used in window and aggregate functions.JpaWindowFrame Common contract for aJpaWindow
frame specification. -
Class Summary Class Description CriteriaDefinition<R> A utility class that makes it easier to build criteria queries. -
Enum Summary Enum Description ValueHandlingMode This enum defines how values passed to JPA Criteria API are handled.