com.healthmarketscience.jackcess.impl
Class TableScanCursor

java.lang.Object
  extended by com.healthmarketscience.jackcess.impl.CursorImpl
      extended by com.healthmarketscience.jackcess.impl.TableScanCursor
All Implemented Interfaces:
Cursor, Iterable<Row>

public class TableScanCursor
extends CursorImpl

Simple un-indexed cursor.

Author:
James Ahlborn

Nested Class Summary
 
Nested classes/interfaces inherited from class com.healthmarketscience.jackcess.impl.CursorImpl
CursorImpl.BaseIterator, CursorImpl.DirHandler, CursorImpl.IdImpl, CursorImpl.PositionImpl, CursorImpl.SavepointImpl
 
Nested classes/interfaces inherited from interface com.healthmarketscience.jackcess.Cursor
Cursor.Id, Cursor.Position, Cursor.Savepoint
 
Field Summary
 
Fields inherited from class com.healthmarketscience.jackcess.impl.CursorImpl
_columnMatcher, _curPos, _prevPos, MOVE_FORWARD, MOVE_REVERSE
 
Constructor Summary
TableScanCursor(TableImpl table)
           
 
Method Summary
protected  CursorImpl.PositionImpl findAnotherPosition(TableImpl.RowState rowState, CursorImpl.PositionImpl curPos, boolean moveForward)
          Finds the next non-deleted row after the given row (as defined by this cursor) and returns the id of the row, where "next" may be backwards if moveForward is false.
protected  com.healthmarketscience.jackcess.impl.TableScanCursor.ScanDirHandler getDirHandler(boolean moveForward)
          Returns the DirHandler for the given movement direction.
protected  CursorImpl.PositionImpl getRowPosition(RowIdImpl rowId)
          Returns the appropriate position information for the given row (which is the current row and is valid).
protected  boolean isUpToDate()
          Returns true if this cursor is up-to-date with respect to the relevant table and related table objects, false otherwise.
protected  void reset(boolean moveForward)
          Resets this cursor for traversing the given direction.
protected  void restorePositionImpl(CursorImpl.PositionImpl curPos, CursorImpl.PositionImpl prevPos)
          Restores a current and previous position for the cursor.
 
Methods inherited from class com.healthmarketscience.jackcess.impl.CursorImpl
afterLast, beforeFirst, createCursor, currentRowMatches, currentRowMatches, currentRowMatches, currentRowMatchesImpl, currentRowMatchesImpl, deleteCurrentRow, findAnotherRow, findAnotherRow, findAnotherRowImpl, findAnotherRowImpl, findFirstRow, findFirstRow, findFirstRow, findNextRow, findNextRow, findNextRow, findRow, getColumnMatcher, getCurrentRow, getCurrentRow, getCurrentRowValue, getCurrentRowValue, getDefaultColumnMatcher, getErrorHandler, getFirstPosition, getFormat, getId, getLastPosition, getNextRow, getNextRow, getPageChannel, getPreviousRow, getPreviousRow, getRowState, getSavepoint, getTable, isAfterLast, isAtBeginning, isBeforeFirst, isCurrentRowDeleted, isCurrentRowValid, iterator, iterator, keepSearching, moveNextRows, movePreviousRows, moveToAnotherRow, moveToNextRow, moveToPreviousRow, newIterable, prepareSearchInfo, prepareSearchInfo, reset, restorePosition, restorePosition, restoreSavepoint, restoreSavepoint, setColumnMatcher, setCurrentRowValue, setCurrentRowValue, setErrorHandler, toString, updateCurrentRow, updateCurrentRowFromMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableScanCursor

public TableScanCursor(TableImpl table)
Method Detail

getDirHandler

protected com.healthmarketscience.jackcess.impl.TableScanCursor.ScanDirHandler getDirHandler(boolean moveForward)
Description copied from class: CursorImpl
Returns the DirHandler for the given movement direction.

Specified by:
getDirHandler in class CursorImpl

isUpToDate

protected boolean isUpToDate()
Description copied from class: CursorImpl
Returns true if this cursor is up-to-date with respect to the relevant table and related table objects, false otherwise.

Overrides:
isUpToDate in class CursorImpl

reset

protected void reset(boolean moveForward)
Description copied from class: CursorImpl
Resets this cursor for traversing the given direction.

Overrides:
reset in class CursorImpl

restorePositionImpl

protected void restorePositionImpl(CursorImpl.PositionImpl curPos,
                                   CursorImpl.PositionImpl prevPos)
                            throws IOException
Description copied from class: CursorImpl
Restores a current and previous position for the cursor.

Overrides:
restorePositionImpl in class CursorImpl
Throws:
IOException

getRowPosition

protected CursorImpl.PositionImpl getRowPosition(RowIdImpl rowId)
                                          throws IOException
Description copied from class: CursorImpl
Returns the appropriate position information for the given row (which is the current row and is valid).

Specified by:
getRowPosition in class CursorImpl
Throws:
IOException

findAnotherPosition

protected CursorImpl.PositionImpl findAnotherPosition(TableImpl.RowState rowState,
                                                      CursorImpl.PositionImpl curPos,
                                                      boolean moveForward)
                                               throws IOException
Description copied from class: CursorImpl
Finds the next non-deleted row after the given row (as defined by this cursor) and returns the id of the row, where "next" may be backwards if moveForward is false. If there are no more rows, the returned rowId should equal the value returned by CursorImpl.getLastPosition() if moving forward and CursorImpl.getFirstPosition() if moving backward.

Specified by:
findAnotherPosition in class CursorImpl
Throws:
IOException


Copyright © 2005-2017 Health Market Science. All Rights Reserved.