FileDocCategorySizeDatePackage
PropertyProjection.javaAPI DocHibernate 3.2.51501Sat Feb 12 00:19:50 GMT 2005org.hibernate.criterion

PropertyProjection

public class PropertyProjection extends SimpleProjection
A property value, or grouped property value
author
Gavin King

Fields Summary
private String
propertyName
private boolean
grouped
Constructors Summary
protected PropertyProjection(String prop, boolean grouped)

		this.propertyName = prop;
		this.grouped = grouped;
	
protected PropertyProjection(String prop)

		this(prop, false);
	
Methods Summary
public java.lang.StringgetPropertyName()

		return propertyName;
	
public org.hibernate.type.Type[]getTypes(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		return new Type[] { criteriaQuery.getType(criteria, propertyName) };
	
public booleanisGrouped()

		return grouped;
	
public java.lang.StringtoGroupSqlString(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		if (!grouped) {
			return super.toGroupSqlString(criteria, criteriaQuery);
		}
		else {
			return criteriaQuery.getColumn(criteria, propertyName);
		}
	
public java.lang.StringtoSqlString(org.hibernate.Criteria criteria, int position, CriteriaQuery criteriaQuery)

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

		return propertyName;