Top Fields Constructors Methods
org.hibernate.loader.criteria

public Class CriteriaQueryTranslator

extends Object
implements CriteriaQuery
Class Inheritance
All Implemented Interfaces
org.hibernate.criterion.CriteriaQuery
Imports
java.util.ArrayList, .Arrays, .HashMap, .HashSet, .Iterator, .List, .Map, .Set, .StringTokenizer, .LinkedHashMap, org.hibernate.Criteria, .EntityMode, .HibernateException, .LockMode, .MappingException, .QueryException, .LockOptions, org.hibernate.criterion.EnhancedProjection, .CriteriaQuery, .Criterion, .Projection, org.hibernate.hql.ast.util.SessionFactoryHelper, org.hibernate.engine.QueryParameters, .RowSelection, .SessionFactoryImplementor, .TypedValue, org.hibernate.impl.CriteriaImpl, org.hibernate.persister.entity.Loadable, .PropertyMapping, .Queryable, org.hibernate.type.AssociationType, .StringRepresentableType, .Type, org.hibernate.util.ArrayHelper, .StringHelper

Author
Gavin King

Field Summary

Modifier and TypeField and Description
private int
private final Map<K, V>
private final Map<K, V>
private final Map<K, V>
private final Map<K, V>
private final Map<K, V>
private CriteriaQuery
public static final String
private final CriteriaImpl
private final String
private final String
private final SessionFactoryImplementor
private final Map<K, V>

Constructor Summary

AccessConstructor and Description
public
CriteriaQueryTranslator(final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final String rootSQLAlias, CriteriaQuery outerQuery)

public
CriteriaQueryTranslator(final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final String rootSQLAlias)

Method Summary

Modifier and TypeMethod and Description
private void
private void
private void
private void
public String[]
findColumns(String propertyName, Criteria subcriteria)

Implements org.hibernate.criterion.CriteriaQuery.findColumns.

Get the names of the columns mapped by a property path; if the property path is not found in subcriteria, try the "outer" query.
public String
private Criteria
public String
getColumn(Criteria criteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getColumn.

Get the names of the columns mapped by a property path, ignoring projection aliases
public String[]
getColumns(String propertyName, Criteria subcriteria)

Implements org.hibernate.criterion.CriteriaQuery.getColumns.

Get the names of the columns mapped by a property path, ignoring projection aliases
public String[]
getColumnsUsingProjection(Criteria subcriteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getColumnsUsingProjection.

Get the names of the columns constrained by this criterion.
public Criteria
public String
getEntityName(Criteria criteria)

Implements org.hibernate.criterion.CriteriaQuery.getEntityName.

Get the entity name of an entity
public String
getEntityName(Criteria subcriteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getEntityName.

Get the entity name of an entity, taking into account the qualifier of the property path
public SessionFactoryImplementor
public String
public String[]
getIdentifierColumns(Criteria subcriteria)

Implements org.hibernate.criterion.CriteriaQuery.getIdentifierColumns.

Get the identifier column names of this entity
public Type
getIdentifierType(Criteria subcriteria)

Implements org.hibernate.criterion.CriteriaQuery.getIdentifierType.

Get the identifier type of this entity
public int
public String
private String
public String[]
public String[]
public Type[]
private PropertyMapping
public String
getPropertyName(String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getPropertyName.

Get the property name, given a possibly qualified property name
public QueryParameters
public Set<E>
public CriteriaImpl
public String
public String
public String
getSQLAlias(Criteria criteria)

Implements org.hibernate.criterion.CriteriaQuery.getSQLAlias.

Get the root table alias of an entity
public String
getSQLAlias(Criteria criteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getSQLAlias.

Get the root table alias of an entity, taking into account the qualifier of the property path
public int
public Type
getType(Criteria subcriteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getType.

Get the type of a property path, ignoring projection aliases
public TypedValue
public TypedValue
getTypedValue(Criteria subcriteria, String propertyName, Object value)

Implements org.hibernate.criterion.CriteriaQuery.getTypedValue.

Get the a typed value for the given property value.
public Type
getTypeUsingProjection(Criteria subcriteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getTypeUsingProjection.

Get the type of a property path
public String
private String
public String
public boolean
public boolean
public boolean
isJoin(String path)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasCountback to summary
private int aliasCount
aliasCriteriaMapback to summary
private final Map<K, V> aliasCriteriaMap
associationPathCriteriaMapback to summary
private final Map<K, V> associationPathCriteriaMap
associationPathJoinTypesMapback to summary
private final Map<K, V> associationPathJoinTypesMap
criteriaEntityNamesback to summary
private final Map<K, V> criteriaEntityNames
criteriaSQLAliasMapback to summary
private final Map<K, V> criteriaSQLAliasMap
outerQueryTranslatorback to summary
private CriteriaQuery outerQueryTranslator
ROOT_SQL_ALIASback to summary
public static final String ROOT_SQL_ALIAS
rootCriteriaback to summary
private final CriteriaImpl rootCriteria
rootEntityNameback to summary
private final String rootEntityName
rootSQLAliasback to summary
private final String rootSQLAlias
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory
withClauseMapback to summary
private final Map<K, V> withClauseMap

Constructor Detail

CriteriaQueryTranslatorback to summary
public CriteriaQueryTranslator(final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final String rootSQLAlias, CriteriaQuery outerQuery) throws HibernateException
CriteriaQueryTranslatorback to summary
public CriteriaQueryTranslator(final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final String rootSQLAlias) throws HibernateException

Method Detail

createAliasCriteriaMapback to summary
private void createAliasCriteriaMap()
createAssociationPathCriteriaMapback to summary
private void createAssociationPathCriteriaMap()
createCriteriaEntityNameMapback to summary
private void createCriteriaEntityNameMap()
createCriteriaSQLAliasMapback to summary
private void createCriteriaSQLAliasMap()
findColumnsback to summary
public String[] findColumns(String propertyName, Criteria subcriteria) throws HibernateException

Implements org.hibernate.criterion.CriteriaQuery.findColumns.

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.

generateSQLAliasback to summary
public String generateSQLAlias()

Implements org.hibernate.criterion.CriteriaQuery.generateSQLAlias.

getAliasedCriteriaback to summary
private Criteria getAliasedCriteria(String alias)
getColumnback to summary
public String getColumn(Criteria criteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getColumn.

Doc from org.hibernate.criterion.CriteriaQuery.getColumn.

Get the names of the columns mapped by a property path, ignoring projection aliases

getColumnsback to summary
public String[] getColumns(String propertyName, Criteria subcriteria) throws HibernateException

Implements org.hibernate.criterion.CriteriaQuery.getColumns.

Doc from org.hibernate.criterion.CriteriaQuery.getColumns.

Get the names of the columns mapped by a property path, ignoring projection aliases

getColumnsUsingProjectionback to summary
public String[] getColumnsUsingProjection(Criteria subcriteria, String propertyName) throws HibernateException

Implements org.hibernate.criterion.CriteriaQuery.getColumnsUsingProjection.

Get the names of the columns constrained by this criterion.

getCriteriaback to summary
public Criteria getCriteria(String path)
getEntityNameback to summary
public String getEntityName(Criteria criteria)

Implements org.hibernate.criterion.CriteriaQuery.getEntityName.

Doc from org.hibernate.criterion.CriteriaQuery.getEntityName.

Get the entity name of an entity

getEntityNameback to summary
public String getEntityName(Criteria subcriteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getEntityName.

Doc from org.hibernate.criterion.CriteriaQuery.getEntityName.

Get the entity name of an entity, taking into account the qualifier of the property path

getFactoryback to summary
public SessionFactoryImplementor getFactory()

Implements org.hibernate.criterion.CriteriaQuery.getFactory.

getGroupByback to summary
public String getGroupBy()
getIdentifierColumnsback to summary
public String[] getIdentifierColumns(Criteria subcriteria)

Implements org.hibernate.criterion.CriteriaQuery.getIdentifierColumns.

Doc from org.hibernate.criterion.CriteriaQuery.getIdentifierColumns.

Get the identifier column names of this entity

getIdentifierTypeback to summary
public Type getIdentifierType(Criteria subcriteria)

Implements org.hibernate.criterion.CriteriaQuery.getIdentifierType.

Doc from org.hibernate.criterion.CriteriaQuery.getIdentifierType.

Get the identifier type of this entity

getJoinTypeback to summary
public int getJoinType(String path)
getOrderByback to summary
public String getOrderBy()
getPathEntityNameback to summary
private String getPathEntityName(String path)
getProjectedAliasesback to summary
public String[] getProjectedAliases()
getProjectedColumnAliasesback to summary
public String[] getProjectedColumnAliases()
getProjectedTypesback to summary
public Type[] getProjectedTypes()
getPropertyMappingback to summary
private PropertyMapping getPropertyMapping(String entityName) throws MappingException
getPropertyNameback to summary
public String getPropertyName(String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getPropertyName.

Doc from org.hibernate.criterion.CriteriaQuery.getPropertyName.

Get the property name, given a possibly qualified property name

getQueryParametersback to summary
public QueryParameters getQueryParameters()
getQuerySpacesback to summary
public Set<E> getQuerySpaces()
getRootCriteriaback to summary
public CriteriaImpl getRootCriteria()
getRootSQLALiasback to summary
public String getRootSQLALias()
getSelectback to summary
public String getSelect()
getSQLAliasback to summary
public String getSQLAlias(Criteria criteria)

Implements org.hibernate.criterion.CriteriaQuery.getSQLAlias.

Doc from org.hibernate.criterion.CriteriaQuery.getSQLAlias.

Get the root table alias of an entity

getSQLAliasback to summary
public String getSQLAlias(Criteria criteria, String propertyName)

Implements org.hibernate.criterion.CriteriaQuery.getSQLAlias.

Doc from org.hibernate.criterion.CriteriaQuery.getSQLAlias.

Get the root table alias of an entity, taking into account the qualifier of the property path

getSQLAliasCountback to summary
public int getSQLAliasCount()
getTypeback to summary
public Type getType(Criteria subcriteria, String propertyName) throws HibernateException

Implements org.hibernate.criterion.CriteriaQuery.getType.

Doc from org.hibernate.criterion.CriteriaQuery.getType.

Get the type of a property path, ignoring projection aliases

getTypedIdentifierValueback to summary
public TypedValue getTypedIdentifierValue(Criteria subcriteria, Object value)

Implements org.hibernate.criterion.CriteriaQuery.getTypedIdentifierValue.

getTypedValueback to summary
public TypedValue getTypedValue(Criteria subcriteria, String propertyName, Object value) throws HibernateException

Implements org.hibernate.criterion.CriteriaQuery.getTypedValue.

Get the a typed value for the given property value.

getTypeUsingProjectionback to summary
public Type getTypeUsingProjection(Criteria subcriteria, String propertyName) throws HibernateException

Implements org.hibernate.criterion.CriteriaQuery.getTypeUsingProjection.

Doc from org.hibernate.criterion.CriteriaQuery.getTypeUsingProjection.

Get the type of a property path

getWhereConditionback to summary
public String getWhereCondition()
getWholeAssociationPathback to summary
private String getWholeAssociationPath(CriteriaImpl.Subcriteria subcriteria)
getWithClauseback to summary
public String getWithClause(String path)
hasProjectionback to summary
public boolean hasProjection()
hasRestrictionback to summary
public boolean hasRestriction(String path)
isJoinback to summary
public boolean isJoin(String path)