public class CriteriaQueryTranslator extends java.lang.Object implements CriteriaQuery
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROOT_SQL_ALIAS |
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
findColumns(java.lang.String propertyName,
Criteria subcriteria)
Get the names of the columns mapped by a property path; if the
property path is not found in subcriteria, try the "outer" query.
|
java.lang.String |
generateSQLAlias()
Generate a unique SQL alias
|
java.lang.String |
getColumn(Criteria criteria,
java.lang.String propertyName)
Resolve a property path to the name of the column it maps to.
|
java.lang.String[] |
getColumns(java.lang.String propertyName,
Criteria subcriteria)
Resolve a property path to the names of the columns it maps to.
|
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()
Provides access to the SessionFactory
|
java.lang.String |
getGroupBy() |
java.lang.String[] |
getIdentifierColumns(Criteria criteria)
Get the identifier column names of this entity
|
Type |
getIdentifierType(Criteria criteria)
Get the identifier type of this entity
|
JoinType |
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<java.io.Serializable> |
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.
|
TypedValue |
getTypedIdentifierValue(Criteria criteria,
java.lang.Object value)
Build a TypedValue for the given identifier 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() |
java.lang.String |
getWithClause(java.lang.String path) |
boolean |
hasProjection() |
boolean |
hasRestriction(java.lang.String path) |
boolean |
isJoin(java.lang.String path) |
void |
setAssociations(java.util.Set<java.lang.String> associations) |
public static final java.lang.String ROOT_SQL_ALIAS
public CriteriaQueryTranslator(SessionFactoryImplementor factory, CriteriaImpl criteria, java.lang.String rootEntityName, java.lang.String rootSQLAlias, CriteriaQuery outerQuery) throws HibernateException
HibernateExceptionpublic CriteriaQueryTranslator(SessionFactoryImplementor factory, CriteriaImpl criteria, java.lang.String rootEntityName, java.lang.String rootSQLAlias) throws HibernateException
HibernateExceptionpublic void setAssociations(java.util.Set<java.lang.String> associations)
public java.lang.String generateSQLAlias()
CriteriaQuerygenerateSQLAlias in interface CriteriaQuerypublic java.lang.String getRootSQLALias()
public boolean isJoin(java.lang.String path)
public JoinType getJoinType(java.lang.String path)
public Criteria getCriteria(java.lang.String path)
public java.util.Set<java.io.Serializable> getQuerySpaces()
public int getSQLAliasCount()
public CriteriaImpl getRootCriteria()
public QueryParameters getQueryParameters()
public boolean hasProjection()
public java.lang.String getGroupBy()
public java.lang.String getSelect()
public Type[] getProjectedTypes()
public java.lang.String[] getProjectedColumnAliases()
public java.lang.String[] getProjectedAliases()
public java.lang.String getWhereCondition()
public java.lang.String getOrderBy()
public SessionFactoryImplementor getFactory()
CriteriaQuerygetFactory in interface CriteriaQuerypublic java.lang.String getSQLAlias(Criteria criteria)
CriteriaQuerygetSQLAlias in interface CriteriaQuerycriteria - The criteriapublic java.lang.String getEntityName(Criteria criteria)
CriteriaQuerygetEntityName in interface CriteriaQuerycriteria - The criteriapublic java.lang.String getColumn(Criteria criteria, java.lang.String propertyName)
CriteriaQuerygetColumn in interface CriteriaQuerycriteria - The overall criteriapropertyName - The property path to resolveCriteriaQuery.getColumns(java.lang.String, org.hibernate.Criteria)public java.lang.String[] getColumnsUsingProjection(Criteria subcriteria, java.lang.String propertyName) throws HibernateException
getColumnsUsingProjection in interface CriteriaQuerysubcriteria - The criteriapropertyName - The property path to resolve or projection aliasHibernateException - if the property/alias could not be resolvedpublic java.lang.String[] getIdentifierColumns(Criteria criteria)
CriteriaQuerygetIdentifierColumns in interface CriteriaQuerycriteria - The criteriapublic Type getIdentifierType(Criteria criteria)
CriteriaQuerygetIdentifierType in interface CriteriaQuerycriteria - The criteriapublic TypedValue getTypedIdentifierValue(Criteria criteria, java.lang.Object value)
CriteriaQuerygetTypedIdentifierValue in interface CriteriaQuerycriteria - The criteria whose identifier is referenced.value - The identifier valuepublic java.lang.String[] getColumns(java.lang.String propertyName,
Criteria subcriteria)
throws HibernateException
CriteriaQuerygetColumns in interface CriteriaQuerypropertyName - The property path to resolvesubcriteria - The criteriaHibernateException - if the property maps to more than 1 column, or if the property could not be resolvedpublic java.lang.String[] findColumns(java.lang.String propertyName,
Criteria subcriteria)
throws HibernateException
findColumns in interface CriteriaQuerypropertyName - The property path to resolvesubcriteria - The criteriaHibernateException - if the property could not be resolvedpublic Type getTypeUsingProjection(Criteria subcriteria, java.lang.String propertyName) throws HibernateException
CriteriaQuerygetTypeUsingProjection in interface CriteriaQuerysubcriteria - The criteriapropertyName - The property path to resolve or projection aliasHibernateException - if the property/alias could not be resolvedpublic Type getType(Criteria subcriteria, java.lang.String propertyName) throws HibernateException
CriteriaQuerygetType in interface CriteriaQuerysubcriteria - The criteriapropertyName - The property path to resolveHibernateException - if the property could not be resolvedpublic TypedValue getTypedValue(Criteria subcriteria, java.lang.String propertyName, java.lang.Object value) throws HibernateException
getTypedValue in interface CriteriaQuerysubcriteria - The criteria querypropertyName - The property path/alias to resolve to type.value - The valueHibernateException - if the property/alias could not be resolvedpublic java.lang.String getEntityName(Criteria subcriteria, java.lang.String propertyName)
CriteriaQuerygetEntityName in interface CriteriaQuerysubcriteria - The criteriapropertyName - The property path that (supposedly) references an entitypublic java.lang.String getSQLAlias(Criteria criteria, java.lang.String propertyName)
CriteriaQuerygetSQLAlias in interface CriteriaQuerycriteria - The criteriapropertyName - The property path whose SQL alias should be returned.public java.lang.String getPropertyName(java.lang.String propertyName)
CriteriaQuerygetPropertyName in interface CriteriaQuerypropertyName - The (possibly qualified) property namepublic java.lang.String getWithClause(java.lang.String path)
public boolean hasRestriction(java.lang.String path)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.