Package org.hibernate.criterion
Interface EnhancedProjection
-
- All Superinterfaces:
Projection
,java.io.Serializable
- All Known Implementing Classes:
AggregateProjection
,AliasedProjection
,AvgProjection
,CountProjection
,Distinct
,ForeingKeyProjection
,IdentifierProjection
,OracleSpatialProjection
,ProjectionList
,Property
,PropertyProjection
,RowCountProjection
,SimpleProjection
public interface EnhancedProjection extends Projection
An "enhanced" Projection for aCriteria
query.- See Also:
Projection
,Criteria
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]
getColumnAliases(int position, Criteria criteria, CriteriaQuery criteriaQuery)
Get the SQL column aliases used by this projection for the columns it writes for inclusion into the SELECT clause (Projection.toSqlString(org.hibernate.Criteria, int, org.hibernate.criterion.CriteriaQuery)
.java.lang.String[]
getColumnAliases(java.lang.String alias, int position, Criteria criteria, CriteriaQuery criteriaQuery)
Get the SQL column aliases used by this projection for the columns it writes for inclusion into the SELECT clause (Projection.toSqlString(org.hibernate.Criteria, int, org.hibernate.criterion.CriteriaQuery)
for a particular criteria-level alias.-
Methods inherited from interface org.hibernate.criterion.Projection
getAliases, getColumnAliases, getColumnAliases, getTypes, getTypes, isGrouped, toGroupSqlString, toSqlString
-
-
-
-
Method Detail
-
getColumnAliases
java.lang.String[] getColumnAliases(int position, Criteria criteria, CriteriaQuery criteriaQuery)
Get the SQL column aliases used by this projection for the columns it writes for inclusion into the SELECT clause (Projection.toSqlString(org.hibernate.Criteria, int, org.hibernate.criterion.CriteriaQuery)
. Hibernate always uses column aliases to extract data from the JDBCResultSet
, so it is important that these be implemented correctly in order for Hibernate to be able to extract these val;ues correctly.- Parameters:
position
- Just as inProjection.toSqlString(org.hibernate.Criteria, int, org.hibernate.criterion.CriteriaQuery)
, represents the number of columns rendered prior to this projection.criteria
- The local criteria to which this project is attached (for resolution).criteriaQuery
- The overall criteria query instance.- Returns:
- The columns aliases.
-
getColumnAliases
java.lang.String[] getColumnAliases(java.lang.String alias, int position, Criteria criteria, CriteriaQuery criteriaQuery)
Get the SQL column aliases used by this projection for the columns it writes for inclusion into the SELECT clause (Projection.toSqlString(org.hibernate.Criteria, int, org.hibernate.criterion.CriteriaQuery)
for a particular criteria-level alias.- Parameters:
alias
- The criteria-level aliasposition
- Just as inProjection.toSqlString(org.hibernate.Criteria, int, org.hibernate.criterion.CriteriaQuery)
, represents the number of columns rendered prior to this projection.criteria
- The local criteria to which this project is attached (for resolution).criteriaQuery
- The overall criteria query instance.- Returns:
- The columns aliases pertaining to a particular criteria-level alias; expected to return null if this projection does not understand this alias.
-
-