summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/qe
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-04-14 15:47:43 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-04-14 15:47:43 +0000
commit7643355f4c35e3db494c9040f67aed3823efa103 (patch)
tree57f8ce29f39ddc09871e6f7368f23a37a4cf2089 /src/main/java/com/amazon/carbonado/qe
parentc5028b6b2d70cd5ab1a051195ade47bd6fec72f9 (diff)
Renamed overloaded slice fetch method to fetchSlice for clarity.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/qe')
-rw-r--r--src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java2
-rw-r--r--src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java4
-rw-r--r--src/main/java/com/amazon/carbonado/qe/EmptyQuery.java2
-rw-r--r--src/main/java/com/amazon/carbonado/qe/QueryExecutor.java2
-rw-r--r--src/main/java/com/amazon/carbonado/qe/StandardQuery.java5
5 files changed, 8 insertions, 7 deletions
diff --git a/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java
index 8a8a127..92e9004 100644
--- a/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java
+++ b/src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java
@@ -45,7 +45,7 @@ public abstract class AbstractQueryExecutor<S extends Storable> implements Query
*
* @since 1.2
*/
- public Cursor<S> fetch(FilterValues<S> values, long from, Long to) throws FetchException {
+ public Cursor<S> fetchSlice(FilterValues<S> values, long from, Long to) throws FetchException {
Cursor<S> cursor = fetch(values);
if (from > 0) {
cursor = new SkipCursor<S>(cursor, from);
diff --git a/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java
index 3ec209d..e0b1be5 100644
--- a/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java
+++ b/src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java
@@ -95,8 +95,8 @@ public class DelegatedQueryExecutor<S extends Storable> implements QueryExecutor
return applyFilterValues(values).fetch();
}
- public Cursor<S> fetch(FilterValues<S> values, long from, Long to) throws FetchException {
- return applyFilterValues(values).fetch(from, to);
+ public Cursor<S> fetchSlice(FilterValues<S> values, long from, Long to) throws FetchException {
+ return applyFilterValues(values).fetchSlice(from, to);
}
public long count(FilterValues<S> values) throws FetchException {
diff --git a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
index 83c09a6..f34500d 100644
--- a/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
+++ b/src/main/java/com/amazon/carbonado/qe/EmptyQuery.java
@@ -219,7 +219,7 @@ public final class EmptyQuery<S extends Storable> extends AbstractQuery<S> {
/**
* Always returns an {@link EmptyCursor}.
*/
- public Cursor<S> fetch(long from, Long to) {
+ public Cursor<S> fetchSlice(long from, Long to) {
checkSliceArguments(from, to);
return EmptyCursor.the();
}
diff --git a/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java
index 6b5a864..358bda2 100644
--- a/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java
+++ b/src/main/java/com/amazon/carbonado/qe/QueryExecutor.java
@@ -50,7 +50,7 @@ public interface QueryExecutor<S extends Storable> {
*
* @since 1.2
*/
- Cursor<S> fetch(FilterValues<S> values, long from, Long to) throws FetchException;
+ Cursor<S> fetchSlice(FilterValues<S> values, long from, Long to) throws FetchException;
/**
* Counts the query results using the given filter values.
diff --git a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java
index f8db1df..3137d3c 100644
--- a/src/main/java/com/amazon/carbonado/qe/StandardQuery.java
+++ b/src/main/java/com/amazon/carbonado/qe/StandardQuery.java
@@ -248,13 +248,14 @@ public abstract class StandardQuery<S extends Storable> extends AbstractQuery<S>
}
}
- public Cursor<S> fetch(long from, Long to) throws FetchException {
+ public Cursor<S> fetchSlice(long from, Long to) throws FetchException {
if (!checkSliceArguments(from, to)) {
return fetch();
}
try {
QueryHints hints = QueryHints.emptyHints().with(QueryHint.CONSUME_SLICE);
- return executorFactory().executor(mFilter, mOrdering, hints).fetch(mValues, from, to);
+ return executorFactory().executor(mFilter, mOrdering, hints)
+ .fetchSlice(mValues, from, to);
} catch (RepositoryException e) {
throw e.toFetchException();
}