org.hibernate.loader.criteria
Class CriteriaQueryTranslator

java.lang.Object
  extended by org.hibernate.loader.criteria.CriteriaQueryTranslator
All Implemented Interfaces:
CriteriaQuery

public class CriteriaQueryTranslator
extends java.lang.Object
implements CriteriaQuery

Author:
Gavin King

Field Summary
static java.lang.String ROOT_SQL_ALIAS
           
 
Constructor Summary
CriteriaQueryTranslator(SessionFactoryImplementor factory, CriteriaImpl criteria, java.lang.String rootEntityName, java.lang.String rootSQLAlias)
           
CriteriaQueryTranslator(SessionFactoryImplementor factory, CriteriaImpl criteria, java.lang.String rootEntityName, java.lang.String rootSQLAlias, CriteriaQuery outerQuery)
           
 
Method Summary
 java.lang.String generateSQLAlias()
           
 java.lang.String getColumn(Criteria criteria, java.lang.String propertyName)
          Get the names of the columns mapped by a property path, ignoring projection aliases
 java.lang.String[] getColumnsUsingProjection(Criteria subcriteria, java.lang.String propertyName)
          Get the names of the columns constrained by this criterion.
 Criteria getCriteria(java.lang.String path)
           
 java.lang.String getEntityName(Criteria criteria)
          Get the entity name of an entity
 java.lang.String getEntityName(Criteria subcriteria, java.lang.String propertyName)
          Get the entity name of an entity, taking into account the qualifier of the property path
 SessionFactoryImplementor getFactory()
           
 java.lang.String getGroupBy()
           
 java.lang.String[] getIdentifierColumns(Criteria subcriteria)
          Get the identifier column names of this entity
 Type getIdentifierType(Criteria subcriteria)
          Get the identifier type of this entity
 int getJoinType(java.lang.String path)
           
 java.lang.String getOrderBy()
           
 java.lang.String[] getProjectedAliases()
           
 java.lang.String[] getProjectedColumnAliases()
           
 Type[] getProjectedTypes()
           
 java.lang.String getPropertyName(java.lang.String propertyName)
          Get the property name, given a possibly qualified property name
 QueryParameters getQueryParameters()
           
 java.util.Set getQuerySpaces()
           
 CriteriaImpl getRootCriteria()
           
 java.lang.String getRootSQLALias()
           
 java.lang.String getSelect()
           
 java.lang.String getSQLAlias(Criteria criteria)
          Get the root table alias of an entity
 java.lang.String getSQLAlias(Criteria criteria, java.lang.String propertyName)
          Get the root table alias of an entity, taking into account the qualifier of the property path
 int getSQLAliasCount()
           
 Type getType(Criteria subcriteria, java.lang.String propertyName)
          Get the type of a property path, ignoring projection aliases
 TypedValue getTypedIdentifierValue(Criteria subcriteria, java.lang.Object value)
           
 TypedValue getTypedValue(Criteria subcriteria, java.lang.String propertyName, java.lang.Object value)
          Get the a typed value for the given property value.
 Type getTypeUsingProjection(Criteria subcriteria, java.lang.String propertyName)
          Get the type of a property path
 java.lang.String getWhereCondition()
           
 boolean hasProjection()
           
 boolean isJoin(java.lang.String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_SQL_ALIAS

public static final java.lang.String ROOT_SQL_ALIAS
See Also:
Constant Field Values
Constructor Detail

CriteriaQueryTranslator

public CriteriaQueryTranslator(SessionFactoryImplementor factory,
                               CriteriaImpl criteria,
                               java.lang.String rootEntityName,
                               java.lang.String rootSQLAlias,
                               CriteriaQuery outerQuery)
                        throws HibernateException
Throws:
HibernateException

CriteriaQueryTranslator

public CriteriaQueryTranslator(SessionFactoryImplementor factory,
                               CriteriaImpl criteria,
                               java.lang.String rootEntityName,
                               java.lang.String rootSQLAlias)
                        throws HibernateException
Throws:
HibernateException
Method Detail

generateSQLAlias

public java.lang.String generateSQLAlias()
Specified by:
generateSQLAlias in interface CriteriaQuery

getRootSQLALias

public java.lang.String getRootSQLALias()

isJoin

public boolean isJoin(java.lang.String path)

getJoinType

public int getJoinType(java.lang.String path)

getCriteria

public Criteria getCriteria(java.lang.String path)

getQuerySpaces

public java.util.Set getQuerySpaces()

getSQLAliasCount

public int getSQLAliasCount()

getRootCriteria

public CriteriaImpl getRootCriteria()

getQueryParameters

public QueryParameters getQueryParameters()

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()

getFactory

public SessionFactoryImplementor getFactory()
Specified by:
getFactory in interface CriteriaQuery

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

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

getColumn

public java.lang.String getColumn(Criteria criteria,
                                  java.lang.String propertyName)
Description copied from interface: CriteriaQuery
Get the names of the columns mapped by a property path, ignoring projection aliases

Specified by:
getColumn in interface CriteriaQuery

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
Throws:
HibernateException

getIdentifierColumns

public java.lang.String[] getIdentifierColumns(Criteria subcriteria)
Description copied from interface: CriteriaQuery
Get the identifier column names of this entity

Specified by:
getIdentifierColumns in interface CriteriaQuery

getIdentifierType

public Type getIdentifierType(Criteria subcriteria)
Description copied from interface: CriteriaQuery
Get the identifier type of this entity

Specified by:
getIdentifierType in interface CriteriaQuery

getTypedIdentifierValue

public TypedValue getTypedIdentifierValue(Criteria subcriteria,
                                          java.lang.Object value)
Specified by:
getTypedIdentifierValue in interface CriteriaQuery

getTypeUsingProjection

public Type getTypeUsingProjection(Criteria subcriteria,
                                   java.lang.String propertyName)
                            throws HibernateException
Description copied from interface: CriteriaQuery
Get the type of a property path

Specified by:
getTypeUsingProjection in interface CriteriaQuery
Throws:
HibernateException

getType

public Type getType(Criteria subcriteria,
                    java.lang.String propertyName)
             throws HibernateException
Description copied from interface: CriteriaQuery
Get the type of a property path, ignoring projection aliases

Specified by:
getType in interface CriteriaQuery
Throws:
HibernateException

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
Throws:
HibernateException

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

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

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


Copyright © 2008 Hibernate.org. All Rights Reserved.