summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/qe
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-04-19 21:12:07 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-04-19 21:12:07 +0000
commit675c72f1e6819e75aff99dd140c83a93b5372026 (patch)
treee9600123cd9650feb5b7e73a16cd19584c7215ce /src/main/java/com/amazon/carbonado/qe
parent487a17e439cf7ae75113ef796d8ee22d2a02f547 (diff)
Moved fetchAfter implementation to AbstractQuery.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/qe')
-rw-r--r--src/main/java/com/amazon/carbonado/qe/AbstractQuery.java4
-rw-r--r--src/main/java/com/amazon/carbonado/qe/EmptyQuery.java7
-rw-r--r--src/main/java/com/amazon/carbonado/qe/StandardQuery.java4
3 files changed, 4 insertions, 11 deletions
diff --git a/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java b/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java
index 767b039..bd27d9a 100644
--- a/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java
+++ b/src/main/java/com/amazon/carbonado/qe/AbstractQuery.java
@@ -53,6 +53,10 @@ public abstract class AbstractQuery<S extends Storable> implements Query<S>, App
return or(Filter.filterFor(getStorableType(), filter));
}
+ public Cursor<S> fetchAfter(S start) throws FetchException {
+ return after(start).fetch();
+ }
+
public S loadOne() throws FetchException {
S obj = tryLoadOne();
if (obj == null) {
diff --git a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
index f34500d..0ddc561 100644
--- a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
+++ b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
@@ -225,13 +225,6 @@ public final class EmptyQuery<S extends Storable> extends AbstractQuery<S> {
}
/**
- * Always returns an {@link EmptyCursor}.
- */
- public Cursor<S> fetchAfter(S start) {
- return EmptyCursor.the();
- }
-
- /**
* Always throws {@link PersistNoneException}.
*/
public void deleteOne() throws PersistNoneException {
diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java
index 71ad1e6..1bb03be 100644
--- a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java
+++ b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java
@@ -275,10 +275,6 @@ public abstract class StandardQuery<S extends Storable> extends AbstractQuery<S>
}
}
- public Cursor<S> fetchAfter(S start) throws FetchException {
- return after(start).fetch();
- }
-
public boolean tryDeleteOne() throws PersistException {
Transaction txn = enterTransaction(IsolationLevel.READ_COMMITTED);
try {