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

BetweenExpression

public class BetweenExpression extends Object implements Criterion
Constrains a property to between two values
author
Gavin King

Fields Summary
private final String
propertyName
private final Object
lo
private final Object
hi
Constructors Summary
protected BetweenExpression(String propertyName, Object lo, Object hi)

		this.propertyName = propertyName;
		this.lo = lo;
		this.hi = hi;
	
Methods Summary
public org.hibernate.engine.TypedValue[]getTypedValues(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		return new TypedValue[] {
				criteriaQuery.getTypedValue(criteria, propertyName, lo),
				criteriaQuery.getTypedValue(criteria, propertyName, hi)
		};
	
public java.lang.StringtoSqlString(org.hibernate.Criteria criteria, CriteriaQuery criteriaQuery)

		return StringHelper.join(
			" and ",
			StringHelper.suffix( criteriaQuery.getColumnsUsingProjection(criteria, propertyName), " between ? and ?" )
		);

		//TODO: get SQL rendering out of this package!
	
public java.lang.StringtoString()

		return propertyName + " between " + lo + " and " + hi;