com.sleepycat.collections
Class MyRangeCursor

java.lang.Object
  extended by com.sleepycat.util.keyrange.RangeCursor
      extended by com.sleepycat.collections.MyRangeCursor
All Implemented Interfaces:
Cloneable

 class MyRangeCursor
extends RangeCursor


Constructor Summary
MyRangeCursor(KeyRange range, CursorConfig config, DataView view, boolean writeAllowed)
           
 
Method Summary
protected  boolean checkRecordNumber()
          If the database is a RECNO or QUEUE database, we know its keys are record numbers.
protected  void closeCursor(Cursor cursor)
          Closes the given cursor.
protected  Cursor dupCursor(Cursor cursor, boolean samePosition)
          Dups the given cursor.
 
Methods inherited from class com.sleepycat.util.keyrange.RangeCursor
close, count, delete, dup, getCurrent, getCursor, getFirst, getLast, getNext, getNextDup, getNextNoDup, getPrev, getPrevDup, getPrevNoDup, getSearchBoth, getSearchBothRange, getSearchKey, getSearchKeyRange, getSearchRecordNumber, isInitialized, put, putAfter, putBefore, putCurrent, putNoDupData, putNoOverwrite
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyRangeCursor

MyRangeCursor(KeyRange range,
              CursorConfig config,
              DataView view,
              boolean writeAllowed)
        throws DatabaseException
Throws:
DatabaseException
Method Detail

dupCursor

protected Cursor dupCursor(Cursor cursor,
                           boolean samePosition)
                    throws DatabaseException
Description copied from class: RangeCursor
Dups the given cursor.

Overrides:
dupCursor in class RangeCursor
Throws:
DatabaseException

closeCursor

protected void closeCursor(Cursor cursor)
                    throws DatabaseException
Description copied from class: RangeCursor
Closes the given cursor.

Overrides:
closeCursor in class RangeCursor
Throws:
DatabaseException

checkRecordNumber

protected boolean checkRecordNumber()
Description copied from class: RangeCursor
If the database is a RECNO or QUEUE database, we know its keys are record numbers. We treat a non-positive record number as out of bounds, that is, we return NOTFOUND rather than throwing IllegalArgumentException as would happen if we passed a non-positive record number into the DB cursor. This behavior is required by the collections interface.

Overrides:
checkRecordNumber in class RangeCursor


Copyright 2004,2008 Oracle. All rights reserved.