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 thefromclause 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 JPACriteriaBuilderis a source of objects which may be composed to express a criteria query.JpaCoalesce<T> JpaCollectionJoin<O,T> Specialization ofJpaJoinforCollectiontyped attribute joinsJpaCompoundSelection<T> JpaConflictClause<T> A conflict clause for insert statements.JpaConflictUpdateAction<T> The update action that should happen on a unique constraint violation for an insert statement.JpaCriteriaBase JpaCriteriaDelete<T> JpaCriteriaInsert<T> The commonalities between insert-select and insert-values.JpaCriteriaInsertSelect<T> A representation of SqmInsertSelectStatement at theorg.hibernate.query.criterialevel, even though JPA does not define support for insert-select criteria.JpaCriteriaInsertValues<T> A representation of SqmInsertValuesStatement at theorg.hibernate.query.criterialevel, 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 JPACriteriaQueryJpaCriteriaUpdate<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 JPAExpressioncontractJpaFetch<O,T> JpaFetchParent<O,T> JpaFrom<O,T> API extension to the JPAFromcontractJpaFunction<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 JPAPathcontractJpaPluralJoin<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 aSELECTquery.JpaRoot<T> JpaSearchedCase<T> JpaSearchOrder Represents the search order for a recursive CTE (common table expression).JpaSelectCriteria<T> Commonality between a JPAJpaCriteriaQueryandJpaSubQuery, mainly in the form of delegation toJpaQueryStructureJpaSelection<T> API extension to the JPASelectioncontractJpaSetJoin<O,T> JpaSimpleCase<C,R> JpaSubQuery<T> JpaTupleElement<T> API extension to the JPATupleElementcontractJpaValues A tuple of values.JpaWindow Common contract for window parts used in window and aggregate functions.JpaWindowFrame Common contract for aJpaWindowframe 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.