summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/qe
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/qe')
-rw-r--r--src/main/java/com/amazon/carbonado/qe/CompositeScore.java1
-rw-r--r--src/main/java/com/amazon/carbonado/qe/EmptyQuery.java1
-rw-r--r--src/main/java/com/amazon/carbonado/qe/FilteringScore.java4
-rw-r--r--src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java1
-rw-r--r--src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java1
-rw-r--r--src/main/java/com/amazon/carbonado/qe/OrderingList.java6
-rw-r--r--src/main/java/com/amazon/carbonado/qe/OrderingScore.java1
-rw-r--r--src/main/java/com/amazon/carbonado/qe/PropertyFilterList.java7
-rw-r--r--src/main/java/com/amazon/carbonado/qe/QueryEngine.java5
-rw-r--r--src/main/java/com/amazon/carbonado/qe/StorableIndexSet.java2
-rw-r--r--src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java1
11 files changed, 29 insertions, 1 deletions
diff --git a/src/main/java/com/amazon/carbonado/qe/CompositeScore.java b/src/main/java/com/amazon/carbonado/qe/CompositeScore.java
index 51c1f73..fd7d9c8 100644
--- a/src/main/java/com/amazon/carbonado/qe/CompositeScore.java
+++ b/src/main/java/com/amazon/carbonado/qe/CompositeScore.java
@@ -218,6 +218,7 @@ public class CompositeScore<S extends Storable> {
mOrderingScore.withRemainderOrdering(ordering));
}
+ @Override
public String toString() {
return "CompositeScore {" + getFilteringScore() + ", " + getOrderingScore() + '}';
}
diff --git a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
index 0ddc561..e9431f3 100644
--- a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
+++ b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
@@ -227,6 +227,7 @@ public final class EmptyQuery<S extends Storable> extends AbstractQuery<S> {
/**
* Always throws {@link PersistNoneException}.
*/
+ @Override
public void deleteOne() throws PersistNoneException {
throw new PersistNoneException();
}
diff --git a/src/main/java/com/amazon/carbonado/qe/FilteringScore.java b/src/main/java/com/amazon/carbonado/qe/FilteringScore.java
index 5efb219..6fa6ca0 100644
--- a/src/main/java/com/amazon/carbonado/qe/FilteringScore.java
+++ b/src/main/java/com/amazon/carbonado/qe/FilteringScore.java
@@ -699,6 +699,7 @@ public class FilteringScore<S extends Storable> {
return new FilteringScore<S>(this, filter);
}
+ @Override
public String toString() {
return "FilteringScore {identityCount=" + getIdentityCount() +
", hasRangeStart=" + hasRangeStart() +
@@ -767,16 +768,19 @@ public class FilteringScore<S extends Storable> {
private boolean isProvidedByIndex(Filter<S> filter) {
return filter.accept(new Visitor<S, Boolean, Object>() {
+ @Override
public Boolean visit(OrFilter<S> filter, Object param) {
return filter.getLeftFilter().accept(this, param)
&& filter.getRightFilter().accept(this, param);
}
+ @Override
public Boolean visit(AndFilter<S> filter, Object param) {
return filter.getLeftFilter().accept(this, param)
&& filter.getRightFilter().accept(this, param);
}
+ @Override
public Boolean visit(PropertyFilter<S> filter, Object param) {
ChainedProperty<S> filterProp = filter.getChainedProperty();
for (OrderedProperty<S> indexProp : mIndexProperties) {
diff --git a/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java
index 3ddd828..875eda3 100644
--- a/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java
+++ b/src/main/java/com/amazon/carbonado/qe/IndexedQueryAnalyzer.java
@@ -544,6 +544,7 @@ public class IndexedQueryAnalyzer<S extends Storable> {
return executor;
}
+ @Override
public String toString() {
return "IndexedQueryAnalyzer.Result {score="
+ getCompositeScore() + ", localIndex="
diff --git a/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java
index f26a9b3..e6f4248 100644
--- a/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java
+++ b/src/main/java/com/amazon/carbonado/qe/KeyQueryExecutor.java
@@ -61,6 +61,7 @@ public class KeyQueryExecutor<S extends Storable> extends AbstractQueryExecutor<
mKeyFilter = score.getIdentityFilter();
}
+ @Override
public Class<S> getStorableType() {
// Storable type of filter may differ if index is used along with a
// join. The type of the index is the correct storable type.
diff --git a/src/main/java/com/amazon/carbonado/qe/OrderingList.java b/src/main/java/com/amazon/carbonado/qe/OrderingList.java
index b6235ac..b096aae 100644
--- a/src/main/java/com/amazon/carbonado/qe/OrderingList.java
+++ b/src/main/java/com/amazon/carbonado/qe/OrderingList.java
@@ -49,6 +49,8 @@ import com.amazon.carbonado.info.StorableIntrospector;
public class OrderingList<S extends Storable> extends AbstractList<OrderedProperty<S>>
implements Serializable
{
+ private static final long serialVersionUID = 3692335128299485356L;
+
private static final OrderingList EMPTY_LIST = new OrderingList();
private static final Map<Class, OrderingList> cCache;
@@ -154,10 +156,12 @@ public class OrderingList<S extends Storable> extends AbstractList<OrderedProper
mSize = parent.mSize + 1;
}
+ @Override
public int size() {
return mSize;
}
+ @Override
public OrderedProperty<S> get(int index) {
return asArray()[index];
}
@@ -363,7 +367,7 @@ public class OrderingList<S extends Storable> extends AbstractList<OrderedProper
private static class Orderings implements Externalizable {
private static final long serialVersionUID = 1L;
- private OrderedProperty<?>[] mOrderings;
+ private OrderedProperty[] mOrderings;
// Required for Externalizable.
public Orderings() {
diff --git a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java
index abf7ac8..9bfcde1 100644
--- a/src/main/java/com/amazon/carbonado/qe/OrderingScore.java
+++ b/src/main/java/com/amazon/carbonado/qe/OrderingScore.java
@@ -483,6 +483,7 @@ public class OrderingScore<S extends Storable> {
return new OrderingScore<S>(this, ordering);
}
+ @Override
public String toString() {
return "OrderingScore {handledCount=" + getHandledCount() +
", remainderCount=" + getRemainderCount() +
diff --git a/src/main/java/com/amazon/carbonado/qe/PropertyFilterList.java b/src/main/java/com/amazon/carbonado/qe/PropertyFilterList.java
index c58aacb..378fc68 100644
--- a/src/main/java/com/amazon/carbonado/qe/PropertyFilterList.java
+++ b/src/main/java/com/amazon/carbonado/qe/PropertyFilterList.java
@@ -86,15 +86,18 @@ class PropertyFilterList<S extends Storable> extends AbstractList<PropertyFilter
final List<ExistsFilter<S>> fexistsList = existsList;
filter.accept(new Visitor<S, Object, Object>() {
+ @Override
public Object visit(OrFilter<S> filter, Object param) {
throw new IllegalArgumentException("OrFilter not allowed");
}
+ @Override
public Object visit(ExistsFilter<S> filter, Object param) {
fexistsList.add(filter);
return null;
}
+ @Override
public Object visit(PropertyFilter<S> filter, Object param) {
flist.add(filter);
return null;
@@ -139,10 +142,12 @@ class PropertyFilterList<S extends Storable> extends AbstractList<PropertyFilter
return mPosMap.get(filter);
}
+ @Override
public int size() {
return mList.size();
}
+ @Override
public PropertyFilter<S> get(int index) {
return mList.get(index);
}
@@ -157,6 +162,8 @@ class PropertyFilterList<S extends Storable> extends AbstractList<PropertyFilter
private static class PFComparator<S extends Storable>
implements Comparator<PropertyFilter<S>>, java.io.Serializable
{
+ private static final long serialVersionUID = 2322537712763223517L;
+
public int compare(PropertyFilter<S> a, PropertyFilter<S> b) {
if (a.getOperator() != b.getOperator()) {
if (a.getOperator() == RelOp.EQ) {
diff --git a/src/main/java/com/amazon/carbonado/qe/QueryEngine.java b/src/main/java/com/amazon/carbonado/qe/QueryEngine.java
index 8e9d642..9b2c13f 100644
--- a/src/main/java/com/amazon/carbonado/qe/QueryEngine.java
+++ b/src/main/java/com/amazon/carbonado/qe/QueryEngine.java
@@ -49,6 +49,7 @@ public class QueryEngine<S extends Storable> extends StandardQueryFactory<S>
return mExecutorFactory.executor(filter, ordering, hints);
}
+ @Override
protected StandardQuery<S> createQuery(Filter<S> filter,
FilterValues<S> values,
OrderingList<S> ordering,
@@ -66,18 +67,22 @@ public class QueryEngine<S extends Storable> extends StandardQueryFactory<S>
super(filter, values, ordering, hints);
}
+ @Override
protected Transaction enterTransaction(IsolationLevel level) {
return mRepoAccess.getRootRepository().enterTransaction(level);
}
+ @Override
protected QueryFactory<S> queryFactory() {
return QueryEngine.this;
}
+ @Override
protected QueryExecutorFactory<S> executorFactory() {
return mExecutorFactory;
}
+ @Override
protected StandardQuery<S> newInstance(FilterValues<S> values,
OrderingList<S> ordering,
QueryHints hints)
diff --git a/src/main/java/com/amazon/carbonado/qe/StorableIndexSet.java b/src/main/java/com/amazon/carbonado/qe/StorableIndexSet.java
index 7055b21..bfa63b1 100644
--- a/src/main/java/com/amazon/carbonado/qe/StorableIndexSet.java
+++ b/src/main/java/com/amazon/carbonado/qe/StorableIndexSet.java
@@ -475,6 +475,8 @@ public class StorableIndexSet<S extends Storable> extends TreeSet<StorableIndex<
private static class StorableIndexComparator
implements Comparator<StorableIndex<?>>, java.io.Serializable
{
+ private static final long serialVersionUID = 2204885249683067349L;
+
public int compare(StorableIndex<?> a, StorableIndex<?> b) {
if (a == b) {
return 0;
diff --git a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java
index 67da7ee..6e5262f 100644
--- a/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java
+++ b/src/main/java/com/amazon/carbonado/qe/UnionQueryAnalyzer.java
@@ -558,6 +558,7 @@ public class UnionQueryAnalyzer<S extends Storable> implements QueryExecutorFact
return 0;
}
+ @Override
public String toString() {
return "Tally: {property=" + mProperty +
", asc=" + mAscendingCount +