From c8cbb8f0c6ffb279a0bd72463e3fa84d9b5a91de Mon Sep 17 00:00:00 2001 From: RunninglVlan Date: Mon, 13 Mar 2017 14:04:50 +0200 Subject: [PATCH] HHH-11584 - Made parameter names of Restrictions#between more readable --- .../hibernate/criterion/BetweenExpression.java | 16 ++++++++-------- .../org/hibernate/criterion/Restrictions.java | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/criterion/BetweenExpression.java b/hibernate-core/src/main/java/org/hibernate/criterion/BetweenExpression.java index 2a339af575..e6accf61e9 100644 --- a/hibernate-core/src/main/java/org/hibernate/criterion/BetweenExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/criterion/BetweenExpression.java @@ -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; } } diff --git a/hibernate-core/src/main/java/org/hibernate/criterion/Restrictions.java b/hibernate-core/src/main/java/org/hibernate/criterion/Restrictions.java index 160e3a6bcb..264f7f8a9d 100755 --- a/hibernate-core/src/main/java/org/hibernate/criterion/Restrictions.java +++ b/hibernate-core/src/main/java/org/hibernate/criterion/Restrictions.java @@ -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 ); } /**