| java.lang.Object com.sleepycat.util.keyrange.RangeCursor
All known Subclasses: com.sleepycat.collections.MyRangeCursor,
RangeCursor | public class RangeCursor implements Cloneable(Code) | | A cursor-like interface that enforces a key range. The method signatures
are actually those of SecondaryCursor, but the pKey parameter may be null.
It was done this way to avoid doubling the number of methods.
This is not a fully general implementation of a range cursor and should
not be used directly by applications; however, it may evolve into a
generally useful range cursor some day.
author: Mark Hayes |
Method Summary | |
protected boolean | checkRecordNumber() If the database is a RECNO or QUEUE database, we know its keys are
record numbers. | public void | close() | protected void | closeCursor(Cursor cursor) Closes the given cursor. | public int | count() | public OperationStatus | delete() | public RangeCursor | dup(boolean samePosition) Create a cloned range cursor. | protected Cursor | dupCursor(Cursor cursor, boolean samePosition) Dups the given cursor. | public OperationStatus | getCurrent(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public Cursor | getCursor() Returns the underlying cursor. | public OperationStatus | getFirst(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getLast(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getNext(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getNextDup(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getNextNoDup(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getPrev(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getPrevDup(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getPrevNoDup(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getSearchBoth(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getSearchBothRange(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getSearchKey(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getSearchKeyRange(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public OperationStatus | getSearchRecordNumber(DatabaseEntry key, DatabaseEntry pKey, DatabaseEntry data, LockMode lockMode) | public boolean | isInitialized() Returns whether the cursor is initialized at a valid position. | public OperationStatus | put(DatabaseEntry key, DatabaseEntry data) | public OperationStatus | putAfter(DatabaseEntry key, DatabaseEntry data) | public OperationStatus | putBefore(DatabaseEntry key, DatabaseEntry data) | public OperationStatus | putCurrent(DatabaseEntry data) | public OperationStatus | putNoDupData(DatabaseEntry key, DatabaseEntry data) | public OperationStatus | putNoOverwrite(DatabaseEntry key, DatabaseEntry data) |
checkRecordNumber | protected boolean checkRecordNumber()(Code) | | 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.
|
dup | public RangeCursor dup(boolean samePosition) throws DatabaseException(Code) | | Create a cloned range cursor. The caller must clone the underlying
cursor before using this constructor, because cursor open/close is
handled specially for CDS cursors outside this class.
|
getCursor | public Cursor getCursor()(Code) | | Returns the underlying cursor. Used for cloning.
|
isInitialized | public boolean isInitialized()(Code) | | Returns whether the cursor is initialized at a valid position.
|
|
|