summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/spi
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-09-03 21:48:14 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-09-03 21:48:14 +0000
commit1e947afa4b660a23a2dcb57463dd810fb73e6030 (patch)
treef8fdb7e2530bc07820f51d30c8e08cf737d6c5ac /src/main/java/com/amazon/carbonado/spi
parent39fce59a840b723eb013bc79285687986592b2da (diff)
Manage ordering properties with lists.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r--src/main/java/com/amazon/carbonado/spi/BaseQuery.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/BaseQuery.java b/src/main/java/com/amazon/carbonado/spi/BaseQuery.java
index e1117cd..b1a1d45 100644
--- a/src/main/java/com/amazon/carbonado/spi/BaseQuery.java
+++ b/src/main/java/com/amazon/carbonado/spi/BaseQuery.java
@@ -49,6 +49,7 @@ import com.amazon.carbonado.qe.EmptyQuery;
* BaseQuery supports binding filters to values.
*
* @author Brian S O'Neill
+ * @deprecated Use {@link com.amazon.carbonado.qe.StandardQuery}
*/
public abstract class BaseQuery<S extends Storable> extends AbstractQuery<S> implements Appender {
/**
@@ -61,6 +62,20 @@ public abstract class BaseQuery<S extends Storable> extends AbstractQuery<S> imp
}
}
+ protected static final String[] EMPTY_ORDERINGS = {};
+
+ protected static String[] extractOrderingNames(OrderedProperty<?>[] orderings) {
+ String[] orderingStrings;
+ if (orderings == null || orderings.length == 0) {
+ return EMPTY_ORDERINGS;
+ }
+ orderingStrings = new String[orderings.length];
+ for (int i=0; i<orderingStrings.length; i++) {
+ orderingStrings[i] = orderings[i].toString().intern();
+ }
+ return orderingStrings;
+ }
+
private final Repository mRepository;
private final Storage<S> mStorage;
// Values for this query.