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
-
Field Summary
Fields inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
btreeTable, db
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeRows
(boolean current) 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.protected boolean
firstRowNum
(boolean first) long
getLimit()
Returns limit of this cursor.long
Returns number of rows accessible with this cursor.long
Returns index of the current row.boolean
goToRow
(long rowNum) Goes to the row with the specified index.boolean
last()
Goes to the last record.protected boolean
lastRowNum
(boolean last) boolean
next()
Goes to the next record.protected boolean
nextRowNum
(boolean next) boolean
previous()
Goes to the previous record.protected boolean
previousRowNum
(boolean previous) void
setLimit
(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, reverse
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
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:ISqlJetCursor
Sets 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:ISqlJetCursor
Returns limit of this cursor.- Returns:
- the limit
-
getRowCount
Description copied from interface:ISqlJetCursor
Returns number of rows accessible with this cursor.- Returns:
- number of rows
- Throws:
SqlJetException
-
computeRows
- Throws:
SqlJetException
-
getRowIndex
Description copied from interface:ISqlJetCursor
Returns 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:ISqlJetCursor
Goes 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:ISqlJetCursor
Deletes the current record.- Throws:
SqlJetException
-
first
Description copied from interface:ISqlJetCursor
Goes to the first record.- Specified by:
first
in interfaceISqlJetCursor
- Overrides:
first
in classSqlJetCursor
- 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
- Overrides:
next
in 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:ISqlJetCursor
Goes to the previous record.- Specified by:
previous
in interfaceISqlJetCursor
- Overrides:
previous
in 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:ISqlJetCursor
Goes to the last record.- Specified by:
last
in interfaceISqlJetCursor
- Overrides:
last
in 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:ISqlJetCursor
Tests whether this cursor is positioned behind the last record.- Specified by:
eof
in interfaceISqlJetCursor
- Overrides:
eof
in classSqlJetCursor
- Returns:
- true if the cursor is not on a record and fields can't be read.
- Throws:
SqlJetException
-