From 7643355f4c35e3db494c9040f67aed3823efa103 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 14 Apr 2008 15:47:43 +0000 Subject: Renamed overloaded slice fetch method to fetchSlice for clarity. --- src/main/java/com/amazon/carbonado/qe/AbstractQueryExecutor.java | 2 +- src/main/java/com/amazon/carbonado/qe/DelegatedQueryExecutor.java | 4 ++-- src/main/java/com/amazon/carbonado/qe/EmptyQuery.java | 2 +- src/main/java/com/amazon/carbonado/qe/QueryExecutor.java | 2 +- src/main/java/com/amazon/carbonado/qe/StandardQuery.java | 5 +++-- 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/qe') 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 implements Query * * @since 1.2 */ - public Cursor fetch(FilterValues values, long from, Long to) throws FetchException { + public Cursor fetchSlice(FilterValues values, long from, Long to) throws FetchException { Cursor cursor = fetch(values); if (from > 0) { cursor = new SkipCursor(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 implements QueryExecutor return applyFilterValues(values).fetch(); } - public Cursor fetch(FilterValues values, long from, Long to) throws FetchException { - return applyFilterValues(values).fetch(from, to); + public Cursor fetchSlice(FilterValues values, long from, Long to) throws FetchException { + return applyFilterValues(values).fetchSlice(from, to); } public long count(FilterValues 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 extends AbstractQuery { /** * Always returns an {@link EmptyCursor}. */ - public Cursor fetch(long from, Long to) { + public Cursor 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 { * * @since 1.2 */ - Cursor fetch(FilterValues values, long from, Long to) throws FetchException; + Cursor fetchSlice(FilterValues 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 extends AbstractQuery } } - public Cursor fetch(long from, Long to) throws FetchException { + public Cursor 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(); } -- cgit v1.2.3