Top Description Fields Constructors Methods
org.hibernate.criterion

public Class IdentifierProjection

extends SimpleProjection
Class Inheritance
Imports
org.hibernate.Criteria, .HibernateException, org.hibernate.type.Type, org.hibernate.util.StringHelper

A property value, or grouped property value
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private boolean

Constructor Summary

AccessConstructor and Description
protected
IdentifierProjection(boolean grouped)

protected

Method Summary

Modifier and TypeMethod and Description
public Type[]
getTypes(Criteria
The local criteria to which this project is attached (for resolution).
criteria
,
CriteriaQuery
The overall criteria query instance.
criteriaQuery
)

Implements org.hibernate.criterion.Projection.getTypes.

Types returned by the rendered SQL fragment.
public boolean
isGrouped()

Overrides org.hibernate.criterion.SimpleProjection.isGrouped.

Implements org.hibernate.criterion.Projection.isGrouped.

Is this projection fragment (SELECT clause) also part of the GROUP BY
public String
toGroupSqlString(Criteria
The local criteria to which this project is attached (for resolution).
criteria
,
CriteriaQuery
The overall criteria query instance.
criteriaQuery
)

Overrides org.hibernate.criterion.SimpleProjection.toGroupSqlString.

Implements org.hibernate.criterion.Projection.toGroupSqlString.

Render the SQL fragment to be used in the GROUP BY clause
public String
toSqlString(Criteria
The local criteria to which this project is attached (for resolution).
criteria
,
int
The number of columns rendered in the SELECT clause before this projection. Generally speaking this is useful to ensure uniqueness of the individual columns aliases.
position
,
CriteriaQuery
The overall criteria query instance.
criteriaQuery
)

Implements org.hibernate.criterion.Projection.toSqlString.

Render the SQL fragment to be used in the SELECT clause.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.hibernate.criterion.SimpleProjection:
asgetAliasesgetColumnAliasesgetColumnAliasesgetColumnAliasesgetColumnAliasesgetColumnCountgetTypes

Field Detail

groupedback to summary
private boolean grouped

Constructor Detail

IdentifierProjectionback to summary
protected IdentifierProjection(boolean grouped)
IdentifierProjectionback to summary
protected IdentifierProjection()

Method Detail

getTypesback to summary
public Type[] getTypes(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Projection.getTypes.

Doc from org.hibernate.criterion.Projection.getTypes.

Types returned by the rendered SQL fragment. In other words what are the types that would represent the values this projection asked to be pulled into the result set?

Parameters
criteria:Criteria

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

criteriaQuery:CriteriaQuery

The overall criteria query instance.

Returns:Type[]

The return types.

Exceptions
HibernateException:
Indicates a problem resolving the types
isGroupedback to summary
public boolean isGrouped()

Overrides org.hibernate.criterion.SimpleProjection.isGrouped.

Implements org.hibernate.criterion.Projection.isGrouped.

Doc from org.hibernate.criterion.Projection.isGrouped.

Is this projection fragment (SELECT clause) also part of the GROUP BY

Returns:boolean

True if the projection is also part of the GROUP BY; false otherwise.

toGroupSqlStringback to summary
public String toGroupSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Overrides org.hibernate.criterion.SimpleProjection.toGroupSqlString.

Implements org.hibernate.criterion.Projection.toGroupSqlString.

Doc from org.hibernate.criterion.Projection.toGroupSqlString.

Render the SQL fragment to be used in the GROUP BY clause

Parameters
criteria:Criteria

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

criteriaQuery:CriteriaQuery

The overall criteria query instance.

Returns:String

The SQL fragment to plug into the GROUP BY

Exceptions
HibernateException:
Indicates a problem performing the rendering
toSqlStringback to summary
public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Projection.toSqlString.

Doc from org.hibernate.criterion.Projection.toSqlString.

Render the SQL fragment to be used in the SELECT clause.

Parameters
criteria:Criteria

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

position:int

The number of columns rendered in the SELECT clause before this projection. Generally speaking this is useful to ensure uniqueness of the individual columns aliases.

criteriaQuery:CriteriaQuery

The overall criteria query instance.

Returns:String

The SQL fragment to plug into the SELECT

Exceptions
HibernateException:
Indicates a problem performing the rendering
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.