Class StandardHqlTranslator

java.lang.Object
org.hibernate.query.hql.internal.StandardHqlTranslator
All Implemented Interfaces:
HqlTranslator

public class StandardHqlTranslator extends Object implements HqlTranslator
Standard implementation of HqlTranslator.
  • Constructor Details

  • Method Details

    • translate

      public <R> SqmStatement<R> translate(String query, Class<R> expectedResultType)
      Description copied from interface: HqlTranslator
      Performs the interpretation of a HQL/JPQL query string to SQM.
      Specified by:
      translate in interface HqlTranslator
      Parameters:
      query - The HQL/JPQL query string to interpret
      expectedResultType - The type specified when creating the query
      Returns:
      The semantic representation of the incoming query.
    • prettifyAntlrError

      public static String prettifyAntlrError(Object offendingSymbol, int line, int charPositionInLine, String message, org.antlr.v4.runtime.RecognitionException e, String hql, boolean includeLocation)
      ANTLR's error messages are surprisingly bad, so try to make them a bit better.