Package org.hibernate.query.criteria
@Incubating
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.
-
ClassDescriptionA utility class that makes it easier to build criteria queries.A JPA
CriteriaBuilder
is a source of objects which may be composed to express a criteria query.The target for cast.JpaCoalesce<T>JpaCollectionJoin<O,T> Specialization ofJpaJoin
forCollection
typed attribute joinsA conflict clause for insert statements.The update action that should happen on a unique constraint violation for an insert statement.The commonalities between insert-select and insert-values.A representation of SqmInsertSelectStatement at theorg.hibernate.query.criteria
level, even though JPA does not define support for insert-select criteria.A representation of SqmInsertValuesStatement at theorg.hibernate.query.criteria
level, even though JPA does not define support for insert-values criteria.Base contract for nodes making up the criteria treeExtension of the JPACriteriaQuery
Extension of the JPACriteriaSelect
.JpaCrossJoin<T>Common contract for criteria parts that can hold CTEs (common table expressions).A CTE (common table expression) criteria.Describes the attribute of aJpaCteCriteriaType
.A CTE (common table expression) criteria type.JpaEntityJoin<L,R> 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.JpaFunctionFrom<O,T> JpaJoin<L,R> A special expression for thejson_exists
function.The base forjson_exists
function nodes.The behavior of the json exists expression when a JSON processing error occurs.A special expression for thejson_query
function.The base forjson_query
function nodes.The behavior of the json query expression when a JSON path does not resolve for a JSON document.The behavior of the json query expression when a JSON processing error occurs.The kind of wrapping to apply to the results of the query.A special expression for the definition of columns within thejson_table
function.A special expression for thejson_table
function.The behavior of the json exists expression when a JSON processing error occurs.A special expression for thejson_value
function.The base forjson_value
function nodes.The behavior of the json value expression when a JSON path does not resolve for a JSON document.The behavior of the json value expression when a JSON processing error occurs.JpaListJoin<O,T> JpaMapJoin<O,K, V> JpaPath<T>API extension to the JPAPath
contractJpaPluralJoin<O,C, E> Common contract for the forms of criteria that are "queryable" - can be converted into aQuery
.A query group i.e.JpaQueryPart<T>Models a query part i.e.Models aSELECT
query.JpaRoot<T>Represents the search order for a recursive CTE (common table expression).Commonality between a JPAJpaCriteriaQuery
andJpaSubQuery
, mainly in the form of delegation toJpaQueryStructure
JpaSelection<T>API extension to the JPASelection
contractJpaSetJoin<O,T> A set returning function criteria.JpaSimpleCase<C,R> JpaSubQuery<T>JpaTreatedFrom<L,R, R1 extends R> JpaTreatedJoin<L,R, R1 extends R> JpaTreatedPath<T,S extends T> API extension to the JPATupleElement
contractA tuple of values.Common contract for window parts used in window and aggregate functions.Common contract for aJpaWindow
frame specification.A special expression for thexmlelement
function.A special node for column defined for axmltable
function.A special expression for thexmltable
function.This enum defines how values passed to JPA Criteria API are handled.