FileDocCategorySizeDatePackage
AggregateProjection.javaAPI DocHibernate 3.2.51112Mon May 08 15:59:20 BST 2006org.hibernate.criterion

AggregateProjection

public class AggregateProjection extends SimpleProjection
An aggregation
author
max

Fields Summary
protected final String
propertyName
private final String
aggregate
Constructors Summary
protected AggregateProjection(String aggregate, String propertyName)

		this.aggregate = aggregate;
		this.propertyName = propertyName;
	
Methods Summary
public org.hibernate.type.Type[]getTypes(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		return new Type[] { criteriaQuery.getType(criteria, propertyName) };
	
public java.lang.StringtoSqlString(org.hibernate.Criteria criteria, int loc, CriteriaQuery criteriaQuery)

		return new StringBuffer()
			.append(aggregate)
			.append("(")
			.append( criteriaQuery.getColumn(criteria, propertyName) )
			.append(") as y")
			.append(loc)
			.append('_")
			.toString();
	
public java.lang.StringtoString()

		return aggregate + "(" + propertyName + ')";