diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/BaseQuery.java | 15 |
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.
|