Interface QueryTranslator

  • All Known Subinterfaces:
    FilterTranslator

    public interface QueryTranslator
    Defines the contract of an HQL->SQL translator.
    • Method Detail

      • compile

        void compile​(Map replacements,
                     boolean shallow)
              throws QueryException,
                     MappingException
        Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops.
        Parameters:
        replacements - Defined query substitutions.
        shallow - Does this represent a shallow (scalar or entity-id) select?
        Throws:
        QueryException - There was a problem parsing the query string.
        MappingException - There was a problem querying defined mappings.
      • iterate

        Iterator iterate​(QueryParameters queryParameters,
                         EventSource session)
                  throws HibernateException
        Perform an iterate operation given the underlying query definition.
        Parameters:
        queryParameters - The query bind parameters.
        session - The session owning this query.
        Returns:
        An iterator over the query results.
        Throws:
        HibernateException
      • getQuerySpaces

        Set<Serializable> getQuerySpaces()
        Returns the set of query spaces (table names) that the query refers to.
        Returns:
        A set of query spaces (table names).
      • getQueryIdentifier

        String getQueryIdentifier()
        Retrieve the query identifier for this translator. The query identifier is used in states collection.
        Returns:
        the identifier
      • getSQLString

        String getSQLString()
        Returns the SQL string generated by the translator.
        Returns:
        the SQL string generated by the translator.
      • collectSqlStrings

        List<String> collectSqlStrings()
      • getQueryString

        String getQueryString()
        Returns the HQL string processed by the translator.
        Returns:
        the HQL string processed by the translator.
      • getEnabledFilters

        Map getEnabledFilters()
        Returns the filters enabled for this query translator.
        Returns:
        Filters enabled for this query execution.
      • getReturnTypes

        Type[] getReturnTypes()
        Returns an array of Types represented in the query result.
        Returns:
        Query return types.
      • getReturnAliases

        String[] getReturnAliases()
        Returns an array of HQL aliases
      • getColumnNames

        String[][] getColumnNames()
        Returns the column names in the generated SQL.
        Returns:
        the column names in the generated SQL.
      • getParameterTranslations

        ParameterTranslations getParameterTranslations()
        Return information about any parameters encountered during translation.
        Returns:
        The parameter information.
      • containsCollectionFetches

        boolean containsCollectionFetches()
        Does the translated query contain collection fetches?
        Returns:
        true if the query does contain collection fetched; false otherwise.
      • isManipulationStatement

        boolean isManipulationStatement()
      • isUpdateStatement

        default boolean isUpdateStatement()
      • getPrimaryFromClauseTables

        default List<String> getPrimaryFromClauseTables()
      • getDynamicInstantiationResultType

        Class getDynamicInstantiationResultType()