public class DelegatedQueryExecutor<S extends Storable> extends java.lang.Object implements QueryExecutor<S>
Constructor and Description |
---|
DelegatedQueryExecutor(Storage<S> rootStorage,
Filter<S> filter,
OrderingList<S> ordering) |
DelegatedQueryExecutor(Storage<S> rootStorage,
QueryExecutor<S> executor) |
Modifier and Type | Method and Description |
---|---|
long |
count(FilterValues<S> values)
Counts the query results using the given filter values.
|
long |
count(FilterValues<S> values,
Query.Controller controller)
Counts the query results using the given filter values.
|
Cursor<S> |
fetch(FilterValues<S> values)
Returns a new cursor using the given filter values.
|
Cursor<S> |
fetch(FilterValues<S> values,
Query.Controller controller)
Returns a new cursor using the given filter values.
|
Cursor<S> |
fetchSlice(FilterValues<S> values,
long from,
java.lang.Long to)
Returns a new cursor using the given filter values and slice.
|
Cursor<S> |
fetchSlice(FilterValues<S> values,
long from,
java.lang.Long to,
Query.Controller controller)
Returns a new cursor using the given filter values and slice.
|
Filter<S> |
getFilter()
Returns the filter used by this QueryExecutor.
|
OrderingList<S> |
getOrdering()
Returns the result ordering of this QueryExecutor.
|
java.lang.Class<S> |
getStorableType()
Returns the storable type that this executor operates on.
|
boolean |
printNative(java.lang.Appendable app,
int indentLevel,
FilterValues<S> values)
Prints the native query to any appendable, if applicable.
|
boolean |
printPlan(java.lang.Appendable app,
int indentLevel,
FilterValues<S> values)
Prints the query plan to any appendable, if applicable.
|
public DelegatedQueryExecutor(Storage<S> rootStorage, QueryExecutor<S> executor) throws FetchException
rootStorage
- root storage to queryexecutor
- executor to emulatejava.lang.IllegalArgumentException
- if any parameter is nullFetchException
public DelegatedQueryExecutor(Storage<S> rootStorage, Filter<S> filter, OrderingList<S> ordering) throws FetchException
rootStorage
- root storage to queryfilter
- optional query filterordering
- optional orderingjava.lang.IllegalArgumentException
- if rootStorage is nullFetchException
public java.lang.Class<S> getStorableType()
QueryExecutor
getStorableType
in interface QueryExecutor<S extends Storable>
public Cursor<S> fetch(FilterValues<S> values) throws FetchException
QueryExecutor
fetch
in interface QueryExecutor<S extends Storable>
FetchException
public Cursor<S> fetch(FilterValues<S> values, Query.Controller controller) throws FetchException
QueryExecutor
fetch
in interface QueryExecutor<S extends Storable>
controller
- optional controller which can abort query operationFetchException
public Cursor<S> fetchSlice(FilterValues<S> values, long from, java.lang.Long to) throws FetchException
QueryExecutor
fetchSlice
in interface QueryExecutor<S extends Storable>
FetchException
public Cursor<S> fetchSlice(FilterValues<S> values, long from, java.lang.Long to, Query.Controller controller) throws FetchException
QueryExecutor
fetchSlice
in interface QueryExecutor<S extends Storable>
controller
- optional controller which can abort query operationFetchException
public long count(FilterValues<S> values) throws FetchException
QueryExecutor
count
in interface QueryExecutor<S extends Storable>
FetchException
public long count(FilterValues<S> values, Query.Controller controller) throws FetchException
QueryExecutor
count
in interface QueryExecutor<S extends Storable>
controller
- optional controller which can abort query operationFetchException
public Filter<S> getFilter()
QueryExecutor
getFilter
in interface QueryExecutor<S extends Storable>
public OrderingList<S> getOrdering()
QueryExecutor
getOrdering
in interface QueryExecutor<S extends Storable>
public boolean printNative(java.lang.Appendable app, int indentLevel, FilterValues<S> values) throws java.io.IOException
QueryExecutor
printNative
in interface QueryExecutor<S extends Storable>
values
- optionaljava.io.IOException
public boolean printPlan(java.lang.Appendable app, int indentLevel, FilterValues<S> values) throws java.io.IOException
QueryExecutor
printPlan
in interface QueryExecutor<S extends Storable>
values
- optionaljava.io.IOException
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.