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
public abstract class SqlJetRowNumCursor extends SqlJetCursor
-
-
Field Summary
-
Fields inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
btreeTable, db
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.longgetRowCount()Returns number of rows accessible with this cursor.longgetRowIndex()Returns 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, 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 Detail
-
setLimit
public void setLimit(long limit) throws SqlJetExceptionDescription 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
public long getRowCount() throws SqlJetExceptionDescription copied from interface:ISqlJetCursorReturns number of rows accessible with this cursor.- Returns:
- number of rows
- Throws:
SqlJetException
-
computeRows
protected void computeRows(boolean current) throws SqlJetException- Throws:
SqlJetException
-
getRowIndex
public long getRowIndex() throws SqlJetExceptionDescription 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
public boolean goToRow(long rowNum) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorGoes to the row with the specified index. Index is 1-based, first record has index of one.- Returns:
- true if cursor has been set on the specified record.
- Throws:
SqlJetException
-
delete
public void delete() throws SqlJetExceptionDescription copied from interface:ISqlJetCursorDeletes the current record.- Throws:
SqlJetException
-
first
public boolean first() throws SqlJetExceptionDescription 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
public boolean next() throws SqlJetExceptionDescription 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
public boolean previous() throws SqlJetExceptionDescription 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
public boolean last() throws SqlJetExceptionDescription 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
protected boolean firstRowNum(boolean first) throws SqlJetException- Throws:
SqlJetException
-
nextRowNum
protected boolean nextRowNum(boolean next) throws SqlJetException- Throws:
SqlJetException
-
previousRowNum
protected boolean previousRowNum(boolean previous) throws SqlJetException- Throws:
SqlJetException
-
lastRowNum
protected boolean lastRowNum(boolean last) throws SqlJetException- Throws:
SqlJetException
-
eof
public boolean eof() throws SqlJetExceptionDescription 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
-
-