Top Description Methods
org.hibernate.criterion

public Interface EnhancedProjection

extends Projection
Known Direct Implementers
org.hibernate.criterion.ProjectionList, org.hibernate.criterion.SimpleProjection, org.hibernate.criterion.AliasedProjection, org.hibernate.criterion.Distinct
Imports
org.hibernate.Criteria

An "enhanced" Projection for a Criteria query.
Author
Gail Badner
See Also
Projection, Criteria

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

The columns aliases.
getColumnAliases
(int
Just as in toSqlString, represents the number of columns rendered prior to this projection.
position
,
Criteria
The local criteria to which this project is attached (for resolution).
criteria
,
CriteriaQuery
The overall criteria query instance.
criteriaQuery
)

Get the SQL column aliases used by this projection for the columns it writes for inclusion into the SELECT clause (toSqlString.

public String[]

Returns:

The columns aliases pertaining to a particular criteria-level alias; expected to return null if this projection does not understand this alias.
getColumnAliases
(String
The criteria-level alias
alias
,
int
Just as in toSqlString, represents the number of columns rendered prior to this projection.
position
,
Criteria
The local criteria to which this project is attached (for resolution).
criteria
,
CriteriaQuery
The overall criteria query instance.
criteriaQuery
)

Get the SQL column aliases used by this projection for the columns it writes for inclusion into the SELECT clause (toSqlString for a particular criteria-level alias.

Inherited from org.hibernate.criterion.Projection:
getAliasesgetColumnAliasesgetColumnAliasesgetTypesgetTypesisGroupedtoGroupSqlStringtoSqlString

Method Detail

getColumnAliasesback to summary
public 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 (toSqlString. Hibernate always uses column aliases to extract data from the JDBC java.sql.ResultSet, so it is important that these be implemented correctly in order for Hibernate to be able to extract these values correctly.

Parameters
position:int

Just as in toSqlString, represents the number of columns rendered prior to this projection.

criteria:Criteria

The local criteria to which this project is attached (for resolution).

criteriaQuery:CriteriaQuery

The overall criteria query instance.

Returns:String[]

The columns aliases.

getColumnAliasesback to summary
public String[] getColumnAliases(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 (toSqlString for a particular criteria-level alias.

Parameters
alias:String

The criteria-level alias

position:int

Just as in toSqlString, represents the number of columns rendered prior to this projection.

criteria:Criteria

The local criteria to which this project is attached (for resolution).

criteriaQuery:CriteriaQuery

The overall criteria query instance.

Returns:String[]

The columns aliases pertaining to a particular criteria-level alias; expected to return null if this projection does not understand this alias.