Class SqlJetCursor
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
- All Implemented Interfaces:
ISqlJetCursor
- Direct Known Subclasses:
SqlJetRowNumCursor
Base implementation of
ISqlJetCursor
.- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the cursor.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.getBlobAsStream
(int field) Returns specified field's value as BLOB.boolean
getBoolean
(int field) Returns specified field's value as boolean.int
Returns number of fields in the current record.getFieldType
(int field) Returns field type.double
getFloat
(int field) Returns specified field's value as float.long
getInteger
(int field) Returns specified field's value as integer.getString
(int field) Returns specified field's value as String.getValue
(int field) Returns value of the field of the specified index in the current row.boolean
isNull
(int field) 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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tmatesoft.sqljet.core.table.ISqlJetCursor
delete, getBlobAsArray, getBlobAsStream, getBoolean, getFieldType, getFloat, getInteger, getLimit, getRowCount, getRowId, getRowIndex, getRowValues, getString, getValue, goTo, goToRow, isNull, setLimit, update, updateByFieldNames, updateByFieldNamesOr, updateOr, updateWithRowId, updateWithRowIdOr
-
Field Details
-
btreeTable
-
db
-
-
Method Details
-
close
Description copied from interface:ISqlJetCursor
Closes the cursor.- Specified by:
close
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
-
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
-
getFieldsCount
Description copied from interface:ISqlJetCursor
Returns number of fields in the current record.- Specified by:
getFieldsCount
in interfaceISqlJetCursor
- 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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-