Interface HqlTranslator


@Incubating(since="8.0") @SPI({IMPLEMENT,SUPPLY}) public interface HqlTranslator

Global integration contract for translating HQL or JPQL text to SQM.

This is not a database Dialect contract. Framework integrations may supply one translator through QueryEngineOptions; the resulting instance is normally shared by the query engine and must therefore be thread-safe. Implementations must produce a fresh semantic statement for each invocation and must not infer database syntax.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <R> SqmStatement<R>
    translate(String hql, Class<R> expectedResultType)
    Performs the interpretation of a HQL/JPQL query string to SQM.
  • Method Details

    • translate

      <R> SqmStatement<R> translate(String hql, Class<R> expectedResultType)
      Performs the interpretation of a HQL/JPQL query string to SQM.
      Parameters:
      hql - The HQL/JPQL query string to interpret
      expectedResultType - The type specified when creating the query
      Returns:
      The semantic representation of the incoming query.