Top Description Fields Constructors Methods
org.hibernate.criterion

public Class RowCountProjection

extends SimpleProjection
Class Inheritance
Imports
java.util.List, org.hibernate.Criteria, .HibernateException, org.hibernate.dialect.function.SQLFunction, org.hibernate.type.Type

A row count
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private static List<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected SQLFunction
getFunction(CriteriaQuery criteriaQuery)

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 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:
asgetAliasesgetColumnAliasesgetColumnAliasesgetColumnAliasesgetColumnAliasesgetColumnCountgetTypesisGroupedtoGroupSqlString

Field Detail

ARGSback to summary
private static List<E> ARGS

Constructor Detail

RowCountProjectionback to summary
public RowCountProjection()

Method Detail

getFunctionback to summary
protected SQLFunction getFunction(CriteriaQuery criteriaQuery)
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
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.