com.amazon.carbonado.qe
Class FullScanQueryExecutor<S extends Storable>

java.lang.Object
  extended by com.amazon.carbonado.qe.AbstractQueryExecutor<S>
      extended by com.amazon.carbonado.qe.FullScanQueryExecutor<S>
All Implemented Interfaces:
QueryExecutor<S>

public class FullScanQueryExecutor<S extends Storable>
extends AbstractQueryExecutor<S>

QueryExecutor which fully scans all Storables of a given type.

Author:
Brian S O'Neill

Nested Class Summary
static interface FullScanQueryExecutor.Support<S extends Storable>
          Provides support for FullScanQueryExecutor.
 
Constructor Summary
FullScanQueryExecutor(FullScanQueryExecutor.Support<S> support)
           
 
Method Summary
 long count(FilterValues<S> values)
          Counts results by opening a cursor and skipping entries.
 Cursor<S> fetch(FilterValues<S> values)
          Returns a new cursor using the given filter values.
 Filter<S> getFilter()
          Returns an open filter.
 OrderingList<S> getOrdering()
          Returns an empty list.
 boolean printPlan(Appendable app, int indentLevel, FilterValues<S> values)
          Prints the query plan to any appendable, if applicable.
 
Methods inherited from class com.amazon.carbonado.qe.AbstractQueryExecutor
fetchSlice, getStorableType, increaseIndent, indent, newline, printNative
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullScanQueryExecutor

public FullScanQueryExecutor(FullScanQueryExecutor.Support<S> support)
Parameters:
support - support for full scan
Throws:
IllegalArgumentException - if support is null
Method Detail

count

public long count(FilterValues<S> values)
           throws FetchException
Description copied from class: AbstractQueryExecutor
Counts results by opening a cursor and skipping entries. Subclasses are encouraged to override with a more efficient implementation.

Specified by:
count in interface QueryExecutor<S extends Storable>
Overrides:
count in class AbstractQueryExecutor<S extends Storable>
Throws:
FetchException

getFilter

public Filter<S> getFilter()
Returns an open filter.

Returns:
query filter, never null

fetch

public Cursor<S> fetch(FilterValues<S> values)
                                 throws FetchException
Description copied from interface: QueryExecutor
Returns a new cursor using the given filter values.

Throws:
FetchException

getOrdering

public OrderingList<S> getOrdering()
Returns an empty list.

Returns:
query ordering in an unmodifiable list

printPlan

public boolean printPlan(Appendable app,
                         int indentLevel,
                         FilterValues<S> values)
                  throws IOException
Description copied from interface: QueryExecutor
Prints the query plan to any appendable, if applicable.

values - optional
Returns:
false if not implemented
Throws:
IOException


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.