From acbacf8fe5550bad7d98c7a8b4aa5b05e91f1263 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 14 Apr 2008 13:10:46 +0000 Subject: Use constants in after filter. --- .../com/amazon/carbonado/qe/StandardQuery.java | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java index 10fdf43..1ee3acb 100644 --- a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java +++ b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java @@ -253,8 +253,6 @@ public abstract class StandardQuery extends AbstractQuery Filter orderFilter = Filter.getClosedFilter(storableType); Filter lastSubFilter = Filter.getOpenFilter(storableType); - Object[] values = new Object[orderings.size()]; - for (int i=0;;) { OrderedProperty property = orderings.get(i); RelOp operator = RelOp.GT; @@ -262,27 +260,15 @@ public abstract class StandardQuery extends AbstractQuery operator = RelOp.LT; } String propertyName = property.getChainedProperty().toString(); - - values[i] = start.getPropertyValue(propertyName); - - orderFilter = orderFilter.or(lastSubFilter.and(propertyName, operator)); - + Object value = start.getPropertyValue(propertyName); + orderFilter = orderFilter.or(lastSubFilter.and(propertyName, operator, value)); if (++i >= orderings.size()) { break; } - - lastSubFilter = lastSubFilter.and(propertyName, RelOp.EQ); - } - - Query query = this.and(orderFilter); - - for (int i=0; i