|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.amazon.carbonado.cursor.AbstractCursor<T>
com.amazon.carbonado.cursor.TransformedCursor<S,T>
S - source type, can be anythingT - target type, can be anythingpublic abstract class TransformedCursor<S,T>
Abstract cursor which wraps another cursor and transforms each storable
result into a target storable. This class can be used for implementing
one-to-one joins. Use MultiTransformedCursor for one-to-many joins.
| Constructor Summary | |
|---|---|
protected |
TransformedCursor(Cursor<S> cursor)
|
| Method Summary | |
|---|---|
void |
close()
Call close to release any resources being held by this cursor. |
boolean |
hasNext()
Returns true if this cursor has more elements. |
T |
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. |
protected abstract T |
transform(S storable)
This method must be implemented to transform storables. |
| 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 TransformedCursor(Cursor<S> cursor)
| Method Detail |
|---|
protected abstract T transform(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 T next()
throws FetchException
Cursor
FetchException - if storage layer throws an exception
public int skipNext(int amount)
throws FetchException
Cursor
skipNext in interface Cursor<T>skipNext in class AbstractCursor<T>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 | |||||||||