Class SqlJetRowNumCursor
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
org.tmatesoft.sqljet.core.internal.table.SqlJetRowNumCursor
- All Implemented Interfaces:
ISqlJetCursor
- Direct Known Subclasses:
SqlJetTableDataCursor
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Field Summary
Fields inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
btreeTable, db -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeRows(boolean current) voiddelete()Deletes the current record.booleaneof()Tests whether this cursor is positioned behind the last record.booleanfirst()Goes to the first record.protected booleanfirstRowNum(boolean first) longgetLimit()Returns limit of this cursor.longReturns number of rows accessible with this cursor.longReturns index of the current row.booleangoToRow(long rowNum) Goes to the row with the specified index.booleanlast()Goes to the last record.protected booleanlastRowNum(boolean last) booleannext()Goes to the next record.protected booleannextRowNum(boolean next) booleanprevious()Goes to the previous record.protected booleanpreviousRowNum(boolean previous) voidsetLimit(long limit) Sets limit for this cursor.Methods inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
close, getBlobAsArray, getBlobAsStream, getBoolean, getFieldsCount, getFieldType, getFloat, getInteger, getString, getValue, isNull, reverseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tmatesoft.sqljet.core.table.ISqlJetCursor
getBlobAsArray, getBlobAsStream, getBoolean, getFieldType, getFloat, getInteger, getRowId, getRowValues, getString, getValue, goTo, isNull, update, updateByFieldNames, updateByFieldNamesOr, updateOr, updateWithRowId, updateWithRowIdOr
-
Method Details
-
setLimit
Description copied from interface:ISqlJetCursorSets limit for this cursor. Negative or zero value resets limit to infinity.- Parameters:
limit- the limit to set- Throws:
SqlJetException
-
getLimit
public long getLimit()Description copied from interface:ISqlJetCursorReturns limit of this cursor.- Returns:
- the limit
-
getRowCount
Description copied from interface:ISqlJetCursorReturns number of rows accessible with this cursor.- Returns:
- number of rows
- Throws:
SqlJetException
-
computeRows
- Throws:
SqlJetException
-
getRowIndex
Description copied from interface:ISqlJetCursorReturns index of the current row. Index is 1-based, first record has index of one.- Returns:
- 1-based index of the current row.
- 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.- Parameters:
rowNum-- Returns:
- true if cursor has been set on the specified record.
- Throws:
SqlJetException
-
delete
Description copied from interface:ISqlJetCursorDeletes the current record.- Throws:
SqlJetException
-
first
Description copied from interface:ISqlJetCursorGoes to the first record.- Specified by:
firstin interfaceISqlJetCursor- Overrides:
firstin classSqlJetCursor- 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- Overrides:
nextin classSqlJetCursor- 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- Overrides:
previousin classSqlJetCursor- Returns:
- true if there is at least one record and begin of cursor is not reached yet
- Throws:
SqlJetException
-
last
Description copied from interface:ISqlJetCursorGoes to the last record.- Specified by:
lastin interfaceISqlJetCursor- Overrides:
lastin classSqlJetCursor- Returns:
- true if there is at least one record.
- Throws:
SqlJetException
-
firstRowNum
- Throws:
SqlJetException
-
nextRowNum
- Throws:
SqlJetException
-
previousRowNum
- Throws:
SqlJetException
-
lastRowNum
- Throws:
SqlJetException
-
eof
Description copied from interface:ISqlJetCursorTests whether this cursor is positioned behind the last record.- Specified by:
eofin interfaceISqlJetCursor- Overrides:
eofin classSqlJetCursor- Returns:
- true if the cursor is not on a record and fields can't be read.
- Throws:
SqlJetException
-