Package org.hibernate.query.hql


package org.hibernate.query.hql
Package defining support for HQL, including JPQL as a subset of HQL.

Concerns handled by subpackages include:

  • query language transformation via ANTLR, and
  • query execution via an instance of Query.

Translation of HQL to SQL involves the following steps:

  • First, the ANTLR-generated tokenizer and parser work in series to parse the text of the query and produce an AST.
  • Next, SemanticQueryBuilder translates the AST into an instance of the SQM (Semantic Query Model) defined in org.hibernate.query.sqm.
  • Next, StandardSqmTranslator transforms the SQM tree and produces a SQL AST, an instance of the syntax tree defined by org.hibernate.sql.ast.tree.
  • Finally, a SQL dialect-specific implementation of SqlAstTranslator produces an executable SQL statement.
See Also: