public class CriteriaQueryTranslator extends Object implements CriteriaQuery
| Modifier and Type | Field and Description |
|---|---|
static String |
ROOT_SQL_ALIAS |
| Constructor and Description |
|---|
CriteriaQueryTranslator(SessionFactoryImplementor factory,
CriteriaImpl criteria,
String rootEntityName,
String rootSQLAlias) |
CriteriaQueryTranslator(SessionFactoryImplementor factory,
CriteriaImpl criteria,
String rootEntityName,
String rootSQLAlias,
CriteriaQuery outerQuery) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
findColumns(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.
|
String |
generateSQLAlias()
Generate a unique SQL alias
|
String |
getColumn(Criteria criteria,
String propertyName)
Resolve a property path to the name of the column it maps to.
|
String[] |
getColumns(String propertyName,
Criteria subcriteria)
Resolve a property path to the names of the columns it maps to.
|
String[] |
getColumnsUsingProjection(Criteria subcriteria,
String propertyName)
Get the names of the columns constrained
by this criterion.
|
Criteria |
getCriteria(String path) |
String |
getEntityName(Criteria criteria)
Get the entity name of an entity
|
String |
getEntityName(Criteria subcriteria,
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
|
String |
getGroupBy() |
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(String path) |
String |
getOrderBy() |
String[] |
getProjectedAliases() |
String[] |
getProjectedColumnAliases() |
Type[] |
getProjectedTypes() |
String |
getPropertyName(String propertyName)
Get the property name, given a possibly qualified property name
|
QueryParameters |
getQueryParameters() |
Set<Serializable> |
getQuerySpaces() |
CriteriaImpl |
getRootCriteria() |
String |
getRootSQLALias() |
String |
getSelect() |
String |
getSQLAlias(Criteria criteria)
Get the root table alias of an entity
|
String |
getSQLAlias(Criteria criteria,
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,
String propertyName)
Get the type of a property path.
|
TypedValue |
getTypedIdentifierValue(Criteria criteria,
Object value)
Build a TypedValue for the given identifier value.
|
TypedValue |
getTypedValue(Criteria subcriteria,
String propertyName,
Object value)
Get the a typed value for the given property value.
|
Type |
getTypeUsingProjection(Criteria subcriteria,
String propertyName)
Get the type of a property path.
|
String |
getWhereCondition() |
String |
getWithClause(String path) |
boolean |
hasProjection() |
boolean |
hasRestriction(String path) |
boolean |
isJoin(String path) |
public static final String ROOT_SQL_ALIAS
public CriteriaQueryTranslator(SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, String rootSQLAlias, CriteriaQuery outerQuery) throws HibernateException
HibernateExceptionpublic CriteriaQueryTranslator(SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, String rootSQLAlias) throws HibernateException
HibernateExceptionpublic String generateSQLAlias()
CriteriaQuerygenerateSQLAlias in interface CriteriaQuerypublic String getRootSQLALias()
public boolean isJoin(String path)
public Set<Serializable> getQuerySpaces()
public int getSQLAliasCount()
public CriteriaImpl getRootCriteria()
public QueryParameters getQueryParameters()
public boolean hasProjection()
public String getGroupBy()
public String getSelect()
public Type[] getProjectedTypes()
public String[] getProjectedColumnAliases()
public String[] getProjectedAliases()
public String getWhereCondition()
public String getOrderBy()
public SessionFactoryImplementor getFactory()
CriteriaQuerygetFactory in interface CriteriaQuerypublic String getSQLAlias(Criteria criteria)
CriteriaQuerygetSQLAlias in interface CriteriaQuerycriteria - The criteriapublic String getEntityName(Criteria criteria)
CriteriaQuerygetEntityName in interface CriteriaQuerycriteria - The criteriapublic String getColumn(Criteria criteria, String propertyName)
CriteriaQuerygetColumn in interface CriteriaQuerycriteria - The overall criteriapropertyName - The property path to resolveCriteriaQuery.getColumns(java.lang.String, org.hibernate.Criteria)public String[] getColumnsUsingProjection(Criteria subcriteria, 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 String[] getIdentifierColumns(Criteria criteria)
CriteriaQuerygetIdentifierColumns in interface CriteriaQuerycriteria - The criteriapublic Type getIdentifierType(Criteria criteria)
CriteriaQuerygetIdentifierType in interface CriteriaQuerycriteria - The criteriapublic TypedValue getTypedIdentifierValue(Criteria criteria, Object value)
CriteriaQuerygetTypedIdentifierValue in interface CriteriaQuerycriteria - The criteria whose identifier is referenced.value - The identifier valuepublic String[] getColumns(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 String[] findColumns(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, 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, 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, String propertyName, 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 String getEntityName(Criteria subcriteria, String propertyName)
CriteriaQuerygetEntityName in interface CriteriaQuerysubcriteria - The criteriapropertyName - The property path that (supposedly) references an entitypublic String getSQLAlias(Criteria criteria, String propertyName)
CriteriaQuerygetSQLAlias in interface CriteriaQuerycriteria - The criteriapropertyName - The property path whose SQL alias should be returned.public String getPropertyName(String propertyName)
CriteriaQuerygetPropertyName in interface CriteriaQuerypropertyName - The (possibly qualified) property namepublic boolean hasRestriction(String path)
Copyright © 2017 JBoss by Red Hat. All rights reserved.