Class SqlJetReverseOrderCursor
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetReverseOrderCursor
- All Implemented Interfaces:
ISqlJetCursor
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the cursor.voiddelete()Deletes the current record.booleaneof()Tests whether this cursor is positioned behind the last record.booleanfirst()Goes to the first record.byte[]getBlobAsArray(int field) Returns specified field's value as BLOB.byte[]getBlobAsArray(String fieldName) Returns specified field's value as BLOB.getBlobAsStream(int field) Returns specified field's value as BLOB.getBlobAsStream(String fieldName) Returns specified field's value as BLOB.booleangetBoolean(int field) Returns specified field's value as boolean.booleangetBoolean(String fieldName) Returns specified field's value as boolean.intReturns number of fields in the current record.getFieldType(int field) Returns field type.getFieldType(String fieldName) Returns field type.doublegetFloat(int field) Returns specified field's value as float.doubleReturns specified field's value as float.longgetInteger(int field) Returns specified field's value as integer.longgetInteger(String fieldName) Returns specified field's value as integer.longgetLimit()Returns limit of this cursor.longReturns number of rows accessible with this cursor.longgetRowId()Gets row Id of the current record.longReturns index of the current row.Object[]Returns all field values of current row.getString(int field) Returns specified field's value as String.Returns specified field's value as String.getValue(int field) Returns value of the field of the specified index in the current row.Returns value of the field with the specified name in the current row.booleangoTo(long rowId) Goes to the record with the specified row Id.booleangoToRow(long rowIndex) Goes to the row with the specified index.booleanisNull(int field) Tests field value for null.booleanTests field value for null.booleanlast()Goes to the last record.booleannext()Goes to the next record.booleanprevious()Goes to the previous record.reverse()Returns cursor with the order reversed.voidsetLimit(long limit) Sets limit for this cursor.voidUpdates the current record.voidupdateByFieldNames(Map<String, Object> values) Updates the current record.voidupdateByFieldNamesOr(SqlJetConflictAction onConflict, Map<String, Object> values) Updates the current record.voidupdateOr(SqlJetConflictAction onConflict, Object... values) Updates the current record.longupdateWithRowId(long rowId, Object... values) Updates rowId and values in the current record.longupdateWithRowIdOr(SqlJetConflictAction onConflict, long rowId, Object... values) Updates rowId and values in the current record.
-
Constructor Details
-
SqlJetReverseOrderCursor
- Throws:
SqlJetException
-
-
Method Details
-
close
Description copied from interface:ISqlJetCursorCloses the cursor.- Specified by:
closein interfaceISqlJetCursor- Throws:
SqlJetException
-
delete
Description copied from interface:ISqlJetCursorDeletes the current record.- Specified by:
deletein interfaceISqlJetCursor- Throws:
SqlJetException
-
eof
Description copied from interface:ISqlJetCursorTests whether this cursor is positioned behind the last record.- Specified by:
eofin interfaceISqlJetCursor- Returns:
- true if the cursor is not on a record and fields can't be read.
- Throws:
SqlJetException
-
first
Description copied from interface:ISqlJetCursorGoes to the first record.- Specified by:
firstin interfaceISqlJetCursor- Returns:
- true if there is at least one record.
- Throws:
SqlJetException
-
getBlobAsArray
Description copied from interface:ISqlJetCursorReturns specified field's value as BLOB.- Specified by:
getBlobAsArrayin interfaceISqlJetCursor- Parameters:
field- index of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsArray
Description copied from interface:ISqlJetCursorReturns specified field's value as BLOB.- Specified by:
getBlobAsArrayin interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsStream
Description copied from interface:ISqlJetCursorReturns specified field's value as BLOB.- Specified by:
getBlobAsStreamin interfaceISqlJetCursor- Parameters:
field- number of field begin from zero- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsStream
Description copied from interface:ISqlJetCursorReturns specified field's value as BLOB.- Specified by:
getBlobAsStreamin interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBoolean
Description copied from interface:ISqlJetCursorReturns specified field's value as boolean.- Specified by:
getBooleanin interfaceISqlJetCursor- Parameters:
field- index of the field- Returns:
- field value
- Throws:
SqlJetException
-
getBoolean
Description copied from interface:ISqlJetCursorReturns specified field's value as boolean.- Specified by:
getBooleanin interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Returns:
- field value
- Throws:
SqlJetException
-
getFieldType
Description copied from interface:ISqlJetCursorReturns field type.- Specified by:
getFieldTypein interfaceISqlJetCursor- Parameters:
field- index of the field- Returns:
- type of field
- Throws:
SqlJetException
-
getFieldType
Description copied from interface:ISqlJetCursorReturns field type.- Specified by:
getFieldTypein interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Returns:
- type of field
- Throws:
SqlJetException
-
getFieldsCount
Description copied from interface:ISqlJetCursorReturns number of fields in the current record.- Specified by:
getFieldsCountin interfaceISqlJetCursor- Throws:
SqlJetException
-
getFloat
Description copied from interface:ISqlJetCursorReturns specified field's value as float.- Specified by:
getFloatin interfaceISqlJetCursor- Parameters:
field- index of the field- Returns:
- field's value as real
- Throws:
SqlJetException
-
getFloat
Description copied from interface:ISqlJetCursorReturns specified field's value as float.- Specified by:
getFloatin interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getInteger
Description copied from interface:ISqlJetCursorReturns specified field's value as integer.- Specified by:
getIntegerin interfaceISqlJetCursor- Parameters:
field- index of the field- Returns:
- field's value as integer
- Throws:
SqlJetException
-
getInteger
Description copied from interface:ISqlJetCursorReturns specified field's value as integer.- Specified by:
getIntegerin interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getRowId
Description copied from interface:ISqlJetCursorGets row Id of the current record.- Specified by:
getRowIdin interfaceISqlJetCursor- Returns:
- row Id of the current record.
- Throws:
SqlJetException
-
getString
Description copied from interface:ISqlJetCursorReturns specified field's value as String.- Specified by:
getStringin interfaceISqlJetCursor- Parameters:
field- index of the field- Returns:
- field's value as string
- Throws:
SqlJetException
-
getString
Description copied from interface:ISqlJetCursorReturns specified field's value as String.- Specified by:
getStringin interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Returns:
- field's value as string
- Throws:
SqlJetException
-
getValue
Description copied from interface:ISqlJetCursorReturns value of the field of the specified index in the current row.- Specified by:
getValuein interfaceISqlJetCursor- Parameters:
field- index of the field- Throws:
SqlJetException
-
getValue
Description copied from interface:ISqlJetCursorReturns value of the field with the specified name in the current row.- Specified by:
getValuein interfaceISqlJetCursor- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
goTo
Description copied from interface:ISqlJetCursorGoes to the record with the specified row Id.- Specified by:
goToin interfaceISqlJetCursor- Parameters:
rowId- row Id- Returns:
- true if cursor was moved successfully.
- Throws:
SqlJetException
-
isNull
Description copied from interface:ISqlJetCursorTests field value for null.- Specified by:
isNullin interfaceISqlJetCursor- Parameters:
field- number of field begin from zero- Returns:
- true if field value is null
- Throws:
SqlJetException
-
isNull
Description copied from interface:ISqlJetCursorTests field value for null.- Specified by:
isNullin interfaceISqlJetCursor- Returns:
- true if field value is null
- Throws:
SqlJetException
-
last
Description copied from interface:ISqlJetCursorGoes to the last record.- Specified by:
lastin interfaceISqlJetCursor- Returns:
- true if there is at least one record.
- Throws:
SqlJetException
-
next
Description copied from interface:ISqlJetCursorGoes to the next record.- Specified by:
nextin interfaceISqlJetCursor- Returns:
- true if there is at least one record and end of cursor is not reached yet
- Throws:
SqlJetException
-
previous
Description copied from interface:ISqlJetCursorGoes to the previous record.- Specified by:
previousin interfaceISqlJetCursor- Returns:
- true if there is at least one record and begin of cursor is not reached yet
- Throws:
SqlJetException
-
update
Description copied from interface:ISqlJetCursorUpdates the current record.- Specified by:
updatein interfaceISqlJetCursor- Parameters:
values- New record values.- Throws:
SqlJetException
-
updateOr
Description copied from interface:ISqlJetCursorUpdates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Specified by:
updateOrin interfaceISqlJetCursor- Parameters:
onConflict-SqlJetConflictAction.values- New record values.- Throws:
SqlJetException
-
updateByFieldNames
Description copied from interface:ISqlJetCursorUpdates the current record.- Specified by:
updateByFieldNamesin interfaceISqlJetCursor- Parameters:
values- New record values mapped by field names.- Throws:
SqlJetException
-
updateByFieldNamesOr
public void updateByFieldNamesOr(SqlJetConflictAction onConflict, Map<String, Object> values) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorUpdates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Specified by:
updateByFieldNamesOrin interfaceISqlJetCursor- Parameters:
onConflict-SqlJetConflictAction.values- New record values mapped by field names.- Throws:
SqlJetException
-
updateWithRowId
Description copied from interface:ISqlJetCursorUpdates rowId and values in the current record.- Specified by:
updateWithRowIdin interfaceISqlJetCursor- Parameters:
values- New record values.- Throws:
SqlJetException
-
updateWithRowIdOr
public long updateWithRowIdOr(SqlJetConflictAction onConflict, long rowId, Object... values) throws SqlJetException Description copied from interface:ISqlJetCursorUpdates rowId and values in the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Specified by:
updateWithRowIdOrin interfaceISqlJetCursor- Parameters:
onConflict-SqlJetConflictAction.values- New record values.- Throws:
SqlJetException
-
reverse
Description copied from interface:ISqlJetCursorReturns cursor with the order reversed.- Specified by:
reversein interfaceISqlJetCursor- Returns:
- cursor that will traverse the same rows as this one, but in reversed order.
- Throws:
SqlJetException
-
getRowIndex
Description copied from interface:ISqlJetCursorReturns index of the current row. Index is 1-based, first record has index of one.- Specified by:
getRowIndexin interfaceISqlJetCursor- Returns:
- 1-based index of the current row.
- Throws:
SqlJetException
-
getRowCount
Description copied from interface:ISqlJetCursorReturns number of rows accessible with this cursor.- Specified by:
getRowCountin interfaceISqlJetCursor- Returns:
- number of rows
- Throws:
SqlJetException
-
goToRow
Description copied from interface:ISqlJetCursorGoes to the row with the specified index. Index is 1-based, first record has index of one.- Specified by:
goToRowin interfaceISqlJetCursor- Parameters:
rowIndex-- Returns:
- true if cursor has been set on the specified record.
- Throws:
SqlJetException
-
getLimit
public long getLimit()Description copied from interface:ISqlJetCursorReturns limit of this cursor.- Specified by:
getLimitin interfaceISqlJetCursor- Returns:
- limit of this cursor or zero if limit has not been set.
-
setLimit
Description copied from interface:ISqlJetCursorSets limit for this cursor. Negative or zero value resets limit to infinity.- Specified by:
setLimitin interfaceISqlJetCursor- Parameters:
limit- limit to set or zero to drop the limit.- Throws:
SqlJetException
-
getRowValues
Description copied from interface:ISqlJetCursorReturns all field values of current row.- Specified by:
getRowValuesin interfaceISqlJetCursor- Returns:
- field values array
- Throws:
SqlJetException
-