public interface HistoricalDataCursor
Cursor
)
specific to a database representing a series of HistoricalData
serializations.
For performance reasons, implementations are not required to return actual HistoricalData
instances,
just the underlying byte[]
BLOB and long
timestamp for each.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the Cursor, releasing all of its resources and making it completely invalid.
|
byte[] |
getBlob()
Returns the BLOB of the historical data as a
byte[] , equivalent to HistoricalData.getBlob()
but a raw byte[] is used for performance reasons. |
int |
getCount()
Returns the numbers of rows in the cursor.
|
long |
getEpochTime()
Returns the epoch time of the historical data as a
long , equivalent to
HistoricalData.getEpochTime() but raw long is used for performance reasons. |
HistoricalData |
getHistoricalData()
Returns the historical data at the current position.
|
int |
getPosition()
Returns the current position of the cursor in the row set.
|
boolean |
isAfterLast()
Returns whether the cursor is pointing to the position after the last
row.
|
boolean |
isBeforeFirst()
Returns whether the cursor is pointing to the position before the first
row.
|
boolean |
isClosed()
return true if the cursor is closed
|
boolean |
isFirst()
Returns whether the cursor is pointing to the first row.
|
boolean |
isLast()
Returns whether the cursor is pointing to the last row.
|
boolean |
move(int offset)
Move the cursor by a relative amount, forward or backward, from the
current position.
|
boolean |
moveToFirst()
Move the cursor to the first row.
|
boolean |
moveToLast()
Move the cursor to the last row.
|
boolean |
moveToNext()
Move the cursor to the next row.
|
boolean |
moveToPosition(int position)
Move the cursor to an absolute position.
|
boolean |
moveToPrevious()
Move the cursor to the previous row.
|
int getCount()
int getPosition()
boolean move(int offset)
This method will return true if the requested destination was reachable, otherwise, it returns false. For example, if the cursor is at currently on the second entry in the result set and move(-5) is called, the position will be pinned at -1, and false will be returned.
offset
- the offset to be applied from the current position.boolean moveToPosition(int position)
This method will return true if the request destination was reachable, otherwise, it returns false.
position
- the zero-based position to move to.boolean moveToFirst()
This method will return false if the cursor is empty.
boolean moveToLast()
This method will return false if the cursor is empty.
boolean moveToNext()
This method will return false if the cursor is already past the last entry in the result set.
boolean moveToPrevious()
This method will return false if the cursor is already before the first entry in the result set.
boolean isFirst()
boolean isLast()
boolean isBeforeFirst()
boolean isAfterLast()
void close()
boolean isClosed()
long getEpochTime()
long
, equivalent to
HistoricalData.getEpochTime()
but raw long
is used for performance reasons.byte[] getBlob()
byte[]
, equivalent to HistoricalData.getBlob()
but a raw byte[]
is used for performance reasons.HistoricalData getHistoricalData()
getEpochTime()
and getBlob()
to directly
access the underlying data without boxing.