BetweenExpressionpublic class BetweenExpression extends Object implements CriterionConstrains a property to between two values |
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.String | toSqlString(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.String | toString()
return propertyName + " between " + lo + " and " + hi;
|
|