HHH-11584 - Made parameter names of Restrictions#between more readable

This commit is contained in:
RunninglVlan 2017-03-13 14:04:50 +02:00 committed by Vlad Mihalcea
parent d1dc9146c3
commit c8cbb8f0c6
2 changed files with 12 additions and 12 deletions

View File

@ -18,13 +18,13 @@ import org.hibernate.internal.util.StringHelper;
*/
public class BetweenExpression implements Criterion {
private final String propertyName;
private final Object lo;
private final Object hi;
private final Object low;
private final Object high;
protected BetweenExpression(String propertyName, Object lo, Object hi) {
protected BetweenExpression(String propertyName, Object low, Object high) {
this.propertyName = propertyName;
this.lo = lo;
this.hi = hi;
this.low = low;
this.high = high;
}
@Override
@ -37,14 +37,14 @@ public class BetweenExpression implements Criterion {
@Override
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException {
return new TypedValue[] {
criteriaQuery.getTypedValue( criteria, propertyName, lo ),
criteriaQuery.getTypedValue( criteria, propertyName, hi )
criteriaQuery.getTypedValue( criteria, propertyName, low),
criteriaQuery.getTypedValue( criteria, propertyName, high)
};
}
@Override
public String toString() {
return propertyName + " between " + lo + " and " + hi;
return propertyName + " between " + low + " and " + high;
}
}

View File

@ -225,15 +225,15 @@ public class Restrictions {
* Apply a "between" constraint to the named property
*
* @param propertyName The name of the property
* @param lo The low value
* @param hi The high value
* @param low The low value
* @param high The high value
*
* @return The Criterion
*
* @see BetweenExpression
*/
public static Criterion between(String propertyName, Object lo, Object hi) {
return new BetweenExpression( propertyName, lo, hi );
public static Criterion between(String propertyName, Object low, Object high) {
return new BetweenExpression( propertyName, low, high );
}
/**