Class CriteriaQueryTranslator

    • Method Detail

      • setAssociations

        public void setAssociations​(Set<String> associations)
      • getRootSQLALias

        public String getRootSQLALias()
      • isJoin

        public boolean isJoin​(String path)
      • getSQLAliasCount

        public int getSQLAliasCount()
      • getRootCriteria

        public org.hibernate.internal.CriteriaImpl getRootCriteria()
      • hasProjection

        public boolean hasProjection()
      • getGroupBy

        public String getGroupBy()
      • getSelect

        public String getSelect()
      • getProjectedTypes

        public Type[] getProjectedTypes()
      • getProjectedColumnAliases

        public String[] getProjectedColumnAliases()
      • getProjectedAliases

        public String[] getProjectedAliases()
      • getWhereCondition

        public String getWhereCondition()
      • getOrderBy

        public String getOrderBy()
      • getSQLAlias

        public String getSQLAlias​(Criteria criteria)
        Description copied from interface: CriteriaQuery
        Get the root table alias of an entity
        Specified by:
        getSQLAlias in interface CriteriaQuery
        Parameters:
        criteria - The criteria
        Returns:
        The SQL table alias for the given criteria
      • getEntityName

        public String getEntityName​(Criteria criteria)
        Description copied from interface: CriteriaQuery
        Get the entity name of an entity
        Specified by:
        getEntityName in interface CriteriaQuery
        Parameters:
        criteria - The criteria
        Returns:
        The entity name
      • getColumnsUsingProjection

        public String[] getColumnsUsingProjection​(Criteria subcriteria,
                                                  String propertyName)
                                           throws HibernateException
        Get the names of the columns constrained by this criterion.
        Specified by:
        getColumnsUsingProjection in interface CriteriaQuery
        Parameters:
        subcriteria - The criteria
        propertyName - The property path to resolve or projection alias
        Returns:
        The column names
        Throws:
        HibernateException - if the property/alias could not be resolved
      • getIdentifierColumns

        public String[] getIdentifierColumns​(Criteria criteria)
        Description copied from interface: CriteriaQuery
        Get the identifier column names of this entity
        Specified by:
        getIdentifierColumns in interface CriteriaQuery
        Parameters:
        criteria - The criteria
        Returns:
        The identifier column names
      • getIdentifierType

        public Type getIdentifierType​(Criteria criteria)
        Description copied from interface: CriteriaQuery
        Get the identifier type of this entity
        Specified by:
        getIdentifierType in interface CriteriaQuery
        Parameters:
        criteria - The criteria
        Returns:
        The identifier type.
      • getTypedIdentifierValue

        public TypedValue getTypedIdentifierValue​(Criteria criteria,
                                                  Object value)
        Description copied from interface: CriteriaQuery
        Build a TypedValue for the given identifier value.
        Specified by:
        getTypedIdentifierValue in interface CriteriaQuery
        Parameters:
        criteria - The criteria whose identifier is referenced.
        value - The identifier value
        Returns:
        The TypedValue
      • getColumns

        public String[] getColumns​(String propertyName,
                                   Criteria subcriteria)
                            throws HibernateException
        Description copied from interface: CriteriaQuery
        Resolve a property path to the names of the columns it maps to. Ignores projection aliases
        Specified by:
        getColumns in interface CriteriaQuery
        Parameters:
        propertyName - The property path to resolve
        subcriteria - The criteria
        Returns:
        The column names
        Throws:
        HibernateException - if the property maps to more than 1 column, or if the property could not be resolved
      • findColumns

        public String[] findColumns​(String propertyName,
                                    Criteria subcriteria)
                             throws HibernateException
        Get the names of the columns mapped by a property path; if the property path is not found in subcriteria, try the "outer" query. Projection aliases are ignored.
        Specified by:
        findColumns in interface CriteriaQuery
        Parameters:
        propertyName - The property path to resolve
        subcriteria - The criteria
        Returns:
        The column names
        Throws:
        HibernateException - if the property could not be resolved
      • getTypeUsingProjection

        public Type getTypeUsingProjection​(Criteria subcriteria,
                                           String propertyName)
                                    throws HibernateException
        Description copied from interface: CriteriaQuery
        Get the type of a property path. Here, the property path can refer to a projection alias.
        Specified by:
        getTypeUsingProjection in interface CriteriaQuery
        Parameters:
        subcriteria - The criteria
        propertyName - The property path to resolve or projection alias
        Returns:
        The type
        Throws:
        HibernateException - if the property/alias could not be resolved
      • getTypedValue

        public TypedValue getTypedValue​(Criteria subcriteria,
                                        String propertyName,
                                        Object value)
                                 throws HibernateException
        Get the typed value for the given property value.
        Specified by:
        getTypedValue in interface CriteriaQuery
        Parameters:
        subcriteria - The criteria query
        propertyName - The property path/alias to resolve to type.
        value - The value
        Returns:
        The TypedValue
        Throws:
        HibernateException - if the property/alias could not be resolved
      • getEntityName

        public String getEntityName​(Criteria subcriteria,
                                    String propertyName)
        Description copied from interface: CriteriaQuery
        Get the entity name of an entity, taking into account the qualifier of the property path
        Specified by:
        getEntityName in interface CriteriaQuery
        Parameters:
        subcriteria - The criteria
        propertyName - The property path that (supposedly) references an entity
        Returns:
        The entity name
      • getSQLAlias

        public String getSQLAlias​(Criteria criteria,
                                  String propertyName)
        Description copied from interface: CriteriaQuery
        Get the root table alias of an entity, taking into account the qualifier of the property path
        Specified by:
        getSQLAlias in interface CriteriaQuery
        Parameters:
        criteria - The criteria
        propertyName - The property path whose SQL alias should be returned.
        Returns:
        The SQL table alias for the given criteria
      • getPropertyName

        public String getPropertyName​(String propertyName)
        Description copied from interface: CriteriaQuery
        Get the property name, given a possibly qualified property name
        Specified by:
        getPropertyName in interface CriteriaQuery
        Parameters:
        propertyName - The (possibly qualified) property name
        Returns:
        The simple property name
      • getWithClause

        public String getWithClause​(String path)
      • hasRestriction

        public boolean hasRestriction​(String path)