Class SqlJetReverseOrderCursor
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetReverseOrderCursor
- All Implemented Interfaces:
ISqlJetCursor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the cursor.void
delete()
Deletes the current record.boolean
eof()
Tests whether this cursor is positioned behind the last record.boolean
first()
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.boolean
getBoolean
(int field) Returns specified field's value as boolean.boolean
getBoolean
(String fieldName) Returns specified field's value as boolean.int
Returns number of fields in the current record.getFieldType
(int field) Returns field type.getFieldType
(String fieldName) Returns field type.double
getFloat
(int field) Returns specified field's value as float.double
Returns specified field's value as float.long
getInteger
(int field) Returns specified field's value as integer.long
getInteger
(String fieldName) Returns specified field's value as integer.long
getLimit()
Returns limit of this cursor.long
Returns number of rows accessible with this cursor.long
getRowId()
Gets row Id of the current record.long
Returns 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.boolean
goTo
(long rowId) Goes to the record with the specified row Id.boolean
goToRow
(long rowIndex) Goes to the row with the specified index.boolean
isNull
(int field) Tests field value for null.boolean
Tests field value for null.boolean
last()
Goes to the last record.boolean
next()
Goes to the next record.boolean
previous()
Goes to the previous record.reverse()
Returns cursor with the order reversed.void
setLimit
(long limit) Sets limit for this cursor.void
Updates the current record.void
updateByFieldNames
(Map<String, Object> values) Updates the current record.void
updateByFieldNamesOr
(SqlJetConflictAction onConflict, Map<String, Object> values) Updates the current record.void
updateOr
(SqlJetConflictAction onConflict, Object... values) Updates the current record.long
updateWithRowId
(long rowId, Object... values) Updates rowId and values in the current record.long
updateWithRowIdOr
(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:ISqlJetCursor
Closes the cursor.- Specified by:
close
in interfaceISqlJetCursor
- Throws:
SqlJetException
-
delete
Description copied from interface:ISqlJetCursor
Deletes the current record.- Specified by:
delete
in interfaceISqlJetCursor
- Throws:
SqlJetException
-
eof
Description copied from interface:ISqlJetCursor
Tests whether this cursor is positioned behind the last record.- Specified by:
eof
in interfaceISqlJetCursor
- Returns:
- true if the cursor is not on a record and fields can't be read.
- Throws:
SqlJetException
-
first
Description copied from interface:ISqlJetCursor
Goes to the first record.- Specified by:
first
in interfaceISqlJetCursor
- Returns:
- true if there is at least one record.
- Throws:
SqlJetException
-
getBlobAsArray
Description copied from interface:ISqlJetCursor
Returns specified field's value as BLOB.- Specified by:
getBlobAsArray
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsArray
Description copied from interface:ISqlJetCursor
Returns specified field's value as BLOB.- Specified by:
getBlobAsArray
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsStream
Description copied from interface:ISqlJetCursor
Returns specified field's value as BLOB.- Specified by:
getBlobAsStream
in interfaceISqlJetCursor
- Parameters:
field
- number of field begin from zero- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsStream
Description copied from interface:ISqlJetCursor
Returns specified field's value as BLOB.- Specified by:
getBlobAsStream
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBoolean
Description copied from interface:ISqlJetCursor
Returns specified field's value as boolean.- Specified by:
getBoolean
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Returns:
- field value
- Throws:
SqlJetException
-
getBoolean
Description copied from interface:ISqlJetCursor
Returns specified field's value as boolean.- Specified by:
getBoolean
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Returns:
- field value
- Throws:
SqlJetException
-
getFieldType
Description copied from interface:ISqlJetCursor
Returns field type.- Specified by:
getFieldType
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Returns:
- type of field
- Throws:
SqlJetException
-
getFieldType
Description copied from interface:ISqlJetCursor
Returns field type.- Specified by:
getFieldType
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Returns:
- type of field
- Throws:
SqlJetException
-
getFieldsCount
Description copied from interface:ISqlJetCursor
Returns number of fields in the current record.- Specified by:
getFieldsCount
in interfaceISqlJetCursor
- Throws:
SqlJetException
-
getFloat
Description copied from interface:ISqlJetCursor
Returns specified field's value as float.- Specified by:
getFloat
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Returns:
- field's value as real
- Throws:
SqlJetException
-
getFloat
Description copied from interface:ISqlJetCursor
Returns specified field's value as float.- Specified by:
getFloat
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Throws:
SqlJetException
-
getInteger
Description copied from interface:ISqlJetCursor
Returns specified field's value as integer.- Specified by:
getInteger
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Returns:
- field's value as integer
- Throws:
SqlJetException
-
getInteger
Description copied from interface:ISqlJetCursor
Returns specified field's value as integer.- Specified by:
getInteger
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Throws:
SqlJetException
-
getRowId
Description copied from interface:ISqlJetCursor
Gets row Id of the current record.- Specified by:
getRowId
in interfaceISqlJetCursor
- Returns:
- row Id of the current record.
- Throws:
SqlJetException
-
getString
Description copied from interface:ISqlJetCursor
Returns specified field's value as String.- Specified by:
getString
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Returns:
- field's value as string
- Throws:
SqlJetException
-
getString
Description copied from interface:ISqlJetCursor
Returns specified field's value as String.- Specified by:
getString
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Returns:
- field's value as string
- Throws:
SqlJetException
-
getValue
Description copied from interface:ISqlJetCursor
Returns value of the field of the specified index in the current row.- Specified by:
getValue
in interfaceISqlJetCursor
- Parameters:
field
- index of the field- Throws:
SqlJetException
-
getValue
Description copied from interface:ISqlJetCursor
Returns value of the field with the specified name in the current row.- Specified by:
getValue
in interfaceISqlJetCursor
- Parameters:
fieldName
- name of the field- Throws:
SqlJetException
-
goTo
Description copied from interface:ISqlJetCursor
Goes to the record with the specified row Id.- Specified by:
goTo
in interfaceISqlJetCursor
- Parameters:
rowId
- row Id- Returns:
- true if cursor was moved successfully.
- Throws:
SqlJetException
-
isNull
Description copied from interface:ISqlJetCursor
Tests field value for null.- Specified by:
isNull
in interfaceISqlJetCursor
- Parameters:
field
- number of field begin from zero- Returns:
- true if field value is null
- Throws:
SqlJetException
-
isNull
Description copied from interface:ISqlJetCursor
Tests field value for null.- Specified by:
isNull
in interfaceISqlJetCursor
- Returns:
- true if field value is null
- Throws:
SqlJetException
-
last
Description copied from interface:ISqlJetCursor
Goes to the last record.- Specified by:
last
in interfaceISqlJetCursor
- Returns:
- true if there is at least one record.
- Throws:
SqlJetException
-
next
Description copied from interface:ISqlJetCursor
Goes to the next record.- Specified by:
next
in 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:ISqlJetCursor
Goes to the previous record.- Specified by:
previous
in 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:ISqlJetCursor
Updates the current record.- Specified by:
update
in interfaceISqlJetCursor
- Parameters:
values
- New record values.- Throws:
SqlJetException
-
updateOr
Description copied from interface:ISqlJetCursor
Updates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction
.- Specified by:
updateOr
in interfaceISqlJetCursor
- Parameters:
onConflict
-SqlJetConflictAction
.values
- New record values.- Throws:
SqlJetException
-
updateByFieldNames
Description copied from interface:ISqlJetCursor
Updates the current record.- Specified by:
updateByFieldNames
in 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:ISqlJetCursor
Updates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction
.- Specified by:
updateByFieldNamesOr
in interfaceISqlJetCursor
- Parameters:
onConflict
-SqlJetConflictAction
.values
- New record values mapped by field names.- Throws:
SqlJetException
-
updateWithRowId
Description copied from interface:ISqlJetCursor
Updates rowId and values in the current record.- Specified by:
updateWithRowId
in interfaceISqlJetCursor
- Parameters:
values
- New record values.- Throws:
SqlJetException
-
updateWithRowIdOr
public long updateWithRowIdOr(SqlJetConflictAction onConflict, long rowId, Object... values) throws SqlJetException Description copied from interface:ISqlJetCursor
Updates rowId and values in the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction
.- Specified by:
updateWithRowIdOr
in interfaceISqlJetCursor
- Parameters:
onConflict
-SqlJetConflictAction
.values
- New record values.- Throws:
SqlJetException
-
reverse
Description copied from interface:ISqlJetCursor
Returns cursor with the order reversed.- Specified by:
reverse
in interfaceISqlJetCursor
- Returns:
- cursor that will traverse the same rows as this one, but in reversed order.
- Throws:
SqlJetException
-
getRowIndex
Description copied from interface:ISqlJetCursor
Returns index of the current row. Index is 1-based, first record has index of one.- Specified by:
getRowIndex
in interfaceISqlJetCursor
- Returns:
- 1-based index of the current row.
- Throws:
SqlJetException
-
getRowCount
Description copied from interface:ISqlJetCursor
Returns number of rows accessible with this cursor.- Specified by:
getRowCount
in interfaceISqlJetCursor
- Returns:
- number of rows
- Throws:
SqlJetException
-
goToRow
Description copied from interface:ISqlJetCursor
Goes to the row with the specified index. Index is 1-based, first record has index of one.- Specified by:
goToRow
in interfaceISqlJetCursor
- Parameters:
rowIndex
-- Returns:
- true if cursor has been set on the specified record.
- Throws:
SqlJetException
-
getLimit
public long getLimit()Description copied from interface:ISqlJetCursor
Returns limit of this cursor.- Specified by:
getLimit
in interfaceISqlJetCursor
- Returns:
- limit of this cursor or zero if limit has not been set.
-
setLimit
Description copied from interface:ISqlJetCursor
Sets limit for this cursor. Negative or zero value resets limit to infinity.- Specified by:
setLimit
in interfaceISqlJetCursor
- Parameters:
limit
- limit to set or zero to drop the limit.- Throws:
SqlJetException
-
getRowValues
Description copied from interface:ISqlJetCursor
Returns all field values of current row.- Specified by:
getRowValues
in interfaceISqlJetCursor
- Returns:
- field values array
- Throws:
SqlJetException
-