summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-10-13 21:09:10 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-10-13 21:09:10 +0000
commit2fd7b3fd77c8141f7fb21d2bd86eb839fa55ef6f (patch)
tree828dd9e9c0c0b8976aa2f4da253d26f7ae2e6861 /src/test
parentc43323482b8c93952743469c40c1c631e293c2a2 (diff)
Pass the internal query executor along when "with" is called, as an optimization.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java b/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java
index bafa244..71a597d 100644
--- a/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java
+++ b/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java
@@ -94,7 +94,7 @@ public class ToyStorage<S extends Storable>
}
public Query<S> query() {
- return new ToyQuery(null, null);
+ return new ToyQuery(null, null, null);
}
public Query<S> query(String filter) {
@@ -102,11 +102,11 @@ public class ToyStorage<S extends Storable>
}
public Query<S> query(Filter<S> filter) {
- return new ToyQuery(filter.initialFilterValues(), null);
+ return new ToyQuery(filter.initialFilterValues(), null, null);
}
public Query<S> query(FilterValues<S> values, OrderingList<S> ordering) {
- return new ToyQuery(values, ordering);
+ return new ToyQuery(values, ordering, null);
}
public QueryExecutor<S> executor(Filter<S> filter, OrderingList<S> ordering) {
@@ -239,8 +239,8 @@ public class ToyStorage<S extends Storable>
}
private class ToyQuery extends StandardQuery<S> {
- ToyQuery(FilterValues<S> values, OrderingList<S> ordering) {
- super(values, ordering);
+ ToyQuery(FilterValues<S> values, OrderingList<S> ordering, QueryExecutor<S> executor) {
+ super(values, ordering, executor);
}
protected Transaction enterTransaction(IsolationLevel level) {
@@ -255,8 +255,11 @@ public class ToyStorage<S extends Storable>
return ToyStorage.this;
}
- protected StandardQuery<S> newInstance(FilterValues<S> values, OrderingList<S> ordering) {
- return new ToyQuery(values, ordering);
+ protected StandardQuery<S> newInstance(FilterValues<S> values,
+ OrderingList<S> ordering,
+ QueryExecutor<S> executor)
+ {
+ return new ToyQuery(values, ordering, executor);
}
}
}