Class CriteriaQueryTranslator

  • All Implemented Interfaces:
    CriteriaQuery

    public class CriteriaQueryTranslator
    extends java.lang.Object
    implements CriteriaQuery
    • Method Detail

      • setAssociations

        public void setAssociations​(java.util.Set<java.lang.String> associations)
      • generateSQLAlias

        public java.lang.String generateSQLAlias()
        Description copied from interface: CriteriaQuery
        Generate a unique SQL alias
        Specified by:
        generateSQLAlias in interface CriteriaQuery
        Returns:
        The generated alias
      • getRootSQLALias

        public java.lang.String getRootSQLALias()
      • isJoin

        public boolean isJoin​(java.lang.String path)
      • getJoinType

        public JoinType getJoinType​(java.lang.String path)
      • getCriteria

        public Criteria getCriteria​(java.lang.String path)
      • getQuerySpaces

        public java.util.Set<java.io.Serializable> getQuerySpaces()
      • getSQLAliasCount

        public int getSQLAliasCount()
      • getRootCriteria

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

        public boolean hasProjection()
      • getGroupBy

        public java.lang.String getGroupBy()
      • getSelect

        public java.lang.String getSelect()
      • getProjectedTypes

        public Type[] getProjectedTypes()
      • getProjectedColumnAliases

        public java.lang.String[] getProjectedColumnAliases()
      • getProjectedAliases

        public java.lang.String[] getProjectedAliases()
      • getWhereCondition

        public java.lang.String getWhereCondition()
      • getOrderBy

        public java.lang.String getOrderBy()
      • getSQLAlias

        public java.lang.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 java.lang.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 java.lang.String[] getColumnsUsingProjection​(Criteria subcriteria,
                                                            java.lang.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 java.lang.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,
                                                  java.lang.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 java.lang.String[] getColumns​(java.lang.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 java.lang.String[] findColumns​(java.lang.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,
                                           java.lang.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
      • getType

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

        public TypedValue getTypedValue​(Criteria subcriteria,
                                        java.lang.String propertyName,
                                        java.lang.Object value)
                                 throws HibernateException
        Get the a 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 java.lang.String getEntityName​(Criteria subcriteria,
                                              java.lang.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 java.lang.String getSQLAlias​(Criteria criteria,
                                            java.lang.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 java.lang.String getPropertyName​(java.lang.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 java.lang.String getWithClause​(java.lang.String path)
      • hasRestriction

        public boolean hasRestriction​(java.lang.String path)