com.amazon.carbonado.qe
Interface IndexedQueryExecutor.Support<S extends Storable>

All Known Subinterfaces:
StorageAccess<S>
Enclosing class:
IndexedQueryExecutor<S extends Storable>

public static interface IndexedQueryExecutor.Support<S extends Storable>

Provides support for IndexedQueryExecutor.


Method Summary
 Cursor<S> fetchFromIndexEntryQuery(StorableIndex<S> index, Query<?> indexEntryQuery)
          Fetch Storables referenced by the given index entry query.
 Cursor<S> fetchSubset(StorableIndex<S> index, Object[] identityValues, BoundaryType rangeStartBoundary, Object rangeStartValue, BoundaryType rangeEndBoundary, Object rangeEndValue, boolean reverseRange, boolean reverseOrder)
          Perform an index scan of a subset of Storables referenced by an index.
 Query<?> indexEntryQuery(StorableIndex<S> index)
          Returns an open query if the given index supports query access.
 

Method Detail

indexEntryQuery

Query<?> indexEntryQuery(StorableIndex<S> index)
                         throws FetchException
Returns an open query if the given index supports query access. If not supported, return null. An index entry query might be used to perform filtering and sorting of index entries prior to being resolved into referenced Storables.

If an index entry query is returned, the fetchSubset method is never called by IndexedQueryExecutor.

Returns:
index entry query or null if not supported
Throws:
FetchException
Since:
1.2

fetchFromIndexEntryQuery

Cursor<S> fetchFromIndexEntryQuery(StorableIndex<S> index,
                                   Query<?> indexEntryQuery)
                                                    throws FetchException
Fetch Storables referenced by the given index entry query. This method is only called if index supports query access.

Parameters:
index - index to open
indexEntryQuery - query with no blank parameters, derived from the query returned by indexEntryQuery
Throws:
FetchException
Since:
1.2

fetchSubset

Cursor<S> fetchSubset(StorableIndex<S> index,
                      Object[] identityValues,
                      BoundaryType rangeStartBoundary,
                      Object rangeStartValue,
                      BoundaryType rangeEndBoundary,
                      Object rangeEndValue,
                      boolean reverseRange,
                      boolean reverseOrder)
                                       throws FetchException
Perform an index scan of a subset of Storables referenced by an index. The identity values are aligned with the index properties at property 0. An optional range start or range end aligns with the index property following the last of the identity values.

This method is only called if no index entry query was provided for the given index.

Parameters:
index - index to open, which may be a primary key index
identityValues - optional list of exactly matching values to apply to index
rangeStartBoundary - start boundary type
rangeStartValue - value to start at if boundary is not open
rangeEndBoundary - end boundary type
rangeEndValue - value to end at if boundary is not open
reverseRange - indicates that range operates on a property whose natural order is descending. Only the code that opens the physical cursor should examine this parameter. If true, then the range start and end parameter pairs need to be swapped.
reverseOrder - when true, iteration should be reversed from its natural order
Throws:
FetchException


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