Top Description Fields Constructors Methods
org.hibernate.criterion

public Class AggregateProjection

extends SimpleProjection
Class Inheritance
Known Direct Subclasses
org.hibernate.criterion.AvgProjection, org.hibernate.criterion.CountProjection
Imports
java.util.Collections, .List, org.hibernate.Criteria, .HibernateException, org.hibernate.dialect.function.SQLFunction, org.hibernate.type.Type

Base class for standard aggregation functions.
Author
max

Field Summary

Modifier and TypeField and Description
private final String
protected final String

Constructor Summary

AccessConstructor and Description
protected
AggregateProjection(String functionName, String propertyName)

Method Summary

Modifier and TypeMethod and Description
protected List<E>
protected List<E>
protected SQLFunction
getFunction(CriteriaQuery criteriaQuery)

protected SQLFunction
getFunction(String functionName, CriteriaQuery criteriaQuery)

public String
public String
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.
loc
,
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

functionNameback to summary
private final String functionName
propertyNameback to summary
protected final String propertyName

Constructor Detail

AggregateProjectionback to summary
protected AggregateProjection(String functionName, String propertyName)

Method Detail

buildFunctionParameterListback to summary
protected List<E> buildFunctionParameterList(Criteria criteria, CriteriaQuery criteriaQuery)
buildFunctionParameterListback to summary
protected List<E> buildFunctionParameterList(String column)
getFunctionback to summary
protected SQLFunction getFunction(CriteriaQuery criteriaQuery)
getFunctionback to summary
protected SQLFunction getFunction(String functionName, CriteriaQuery criteriaQuery)
getFunctionNameback to summary
public String getFunctionName()
getPropertyNameback to summary
public String getPropertyName()
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.

Annotations
@Override
Exceptions
HibernateException:
Indicates a problem resolving the types
toSqlStringback to summary
public String toSqlString(Criteria criteria, int loc, 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).

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

Annotations
@Override
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.

Annotations
@Override