|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.cursor.AbstractCursor<S>
com.amazon.carbonado.cursor.FilteredCursor<S>
public abstract class FilteredCursor<S>
Wraps another cursor and applies custom filtering to reduce the set of results.
| Constructor Summary | |
|---|---|
protected |
FilteredCursor(Cursor<S> cursor)
|
| Method Summary | ||
|---|---|---|
static
|
applyFilter(Cursor<S> cursor,
Class<S> type,
String filter,
Object... filterValues)
Returns a Cursor that is filtered by the given filter expression and values. |
|
static
|
applyFilter(Filter<S> filter,
FilterValues<S> filterValues,
Cursor<S> cursor)
Returns a Cursor that is filtered by the given Filter and FilterValues. |
|
void |
close()
Call close to release any resources being held by this cursor. |
|
boolean |
hasNext()
Returns true if this cursor has more elements. |
|
protected abstract boolean |
isAllowed(S storable)
|
|
S |
next()
Returns the next element from this cursor. |
|
int |
skipNext(int amount)
Skips forward by the specified amount of elements, returning the actual amount skipped. |
|
| Methods inherited from class com.amazon.carbonado.cursor.AbstractCursor |
|---|
copyInto, copyInto, toList, toList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected FilteredCursor(Cursor<S> cursor)
| Method Detail |
|---|
public static <S extends Storable> Cursor<S> applyFilter(Cursor<S> cursor,
Class<S> type,
String filter,
Object... filterValues)
cursor - cursor to wraptype - type of storablefilter - filter to applyfilterValues - values for filter
IllegalStateException - if any values are not specified
IllegalArgumentException - if any argument is null
public static <S extends Storable> Cursor<S> applyFilter(Filter<S> filter,
FilterValues<S> filterValues,
Cursor<S> cursor)
filter - filter to applyfilterValues - values for filter, which may be null if filter has no parameterscursor - cursor to wrap
IllegalStateException - if any values are not specified
IllegalArgumentException - if filter is closed
protected abstract boolean isAllowed(S storable)
throws FetchException
FetchException
public void close()
throws FetchException
Cursor
FetchException
public boolean hasNext()
throws FetchException
Cursornext would return an element rather than throwing
an exception.
FetchException - if storage layer throws an exception
public S next()
throws FetchException
Cursor
FetchException - if storage layer throws an exception
public int skipNext(int amount)
throws FetchException
Cursor
skipNext in interface Cursor<S>skipNext in class AbstractCursor<S>amount - maximum amount of elements to skip
FetchException - if storage layer throws an exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||