Package org.hibernate.query
package org.hibernate.query
Everything related to HQL/JPQL, native SQL, and criteria queries.
The important interfaces SelectionQuery
,
MutationQuery
, Query
,
and NativeQuery
provide an API for executing
queries. Instances of these interfaces may be obtained from a
QueryProducer
, that is, from any
Session
or StatelessSession
.
The classes Order
, Page
,
KeyedPage
, and KeyedResultList
define an API for dynamic ordering and key-based pagination. These
classes are especially useful as parameters of generated
@Find
and
@HQL
methods.
Hibernate's extensions to the JPA criteria query API are defined in the
subpackage org.hibernate.query.criteria
, with
HibernateCriteriaBuilder
as the
entry point.
Other subpackages contain SPIs and internal implementation details, including the HQL parser and translator.
-
ClassDescriptionDefines the aspects of query execution and parameter binding that apply to all forms of querying: queries written in HQL or JPQL, queries written in the native SQL dialect of the database, criteria queries, and stored procedure calls.Indicates an attempt to call
QueryProducer.createMutationQuery(String)
,QueryProducer.createNamedMutationQuery(String)
orQueryProducer.createNativeMutationQuery(String)
with a non-mutation query (generally a select query)Indicates a named-query has specified options that are not legalThrown when an operation of theQuery
interface is called which is unsupported due to the nature of the query itself.Indicates an attempt to callQueryProducer.createSelectionQuery(String)
with a non-selection query (generally a mutation query)KeyedPage<R>Support for pagination based on a unique key of the result set instead of theoffset
.Support for pagination based on a unique key of the result set instead of theoffset
.Within the context of an active session, an instance of this type represents an executable mutation query, that is, aninsert
,update
, ordelete
.Indicates that validation and translation of one or more named queries failed at initialization time.NativeQuery<T>Within the context of an active session, an instance of this type represents an executable query written in the native SQL dialect of the underlying database.Allows access to further control how collection returns are mapped back from result sets.Allows access to further control how join fetch returns are mapped back from result sets.Simple unification interface for all returns from the variousaddXYZ()
methods.ANativeQuery.ResultNode
which can be a query result.Allows access to further control how properties within a root or join fetch are mapped back from the result set.Allows access to further control how root returns are mapped back from result sets.Indicates an attempt to use a non-indexed collection as indexed.Deprecated.Use Jakarta Persistence Nulls instead.Order<X>A rule for sorting a query result set.Identifies a page of query results by page size and page number.Indicates a problem with the labelling of query parameters.Information about the parameters of a query.Indicates a problem with a path expression in HQL/JPQL.Query<R>Within the context of an active session, an instance of this type represents an executable query, either: a query written in HQL, a named query written in HQL or native SQL, or a criteria query.An error that occurs binding an argument to a query parameter.Enumerates the possible flush modes for execution of aQuery
.Represents a parameter defined in the source (HQL/JPQL or criteria) query.An object which can produce instances ofSelectionQuery
andMutationQuery
.Indicates a mismatch between the expected and actual result types of a query.Within the context of an active session, an instance of this type represents an executable selection query, that is, aselect
.Represents an error in the semantics (meaning) of a HQL/JPQL query.Enumerates the directions in which query results may be sorted.Represents the abstract notion of a query whose results are affected by the data stored in a given set of named query spaces.Represents a syntax error in a HQL/JPQL query.Represents a typed argument to a query parameter.Extension to TupleTransformer exposing the transformation target type.Occurs when a named query is requested, and there is no known HQL or native SQL query registered under the given name.Indicates an attempt to find an unknown query parameter or an attempt to bind a value to an unknown query parameterIndicates a request for named ResultSet mapping which could not be found