Package Functions | |
DataView (Database database, EntryBinding keyBinding, EntryBinding valueBinding, EntityBinding entityBinding, boolean writeAllowed, PrimaryKeyAssigner keyAssigner) throws IllegalArgumentException | |
DataView | keySetView () |
DataView | valueSetView () |
DataView | valueSetView (Object singleKey) throws DatabaseException, KeyRangeException |
DataView | subView (Object beginKey, boolean beginInclusive, Object endKey, boolean endInclusive, EntryBinding keyBinding) throws DatabaseException, KeyRangeException |
DataView | configuredView (CursorConfig config) |
CurrentTransaction | getCurrentTxn () |
DatabaseEntry | getSingleKeyThang () |
final Environment | getEnv () |
final boolean | isSecondary () |
boolean | isEmpty () throws DatabaseException |
OperationStatus | append (Object value, Object[] retPrimaryKey, Object[] retValue) throws DatabaseException |
Transaction | useTransaction () |
void | clear () throws DatabaseException |
DataCursor | join (DataView[] indexViews, Object[] indexKeys, JoinConfig joinConfig) throws DatabaseException |
DataCursor | join (DataCursor[] indexCursors, JoinConfig joinConfig) throws DatabaseException |
boolean | useKey (Object key, Object value, DatabaseEntry keyThang, KeyRange checkRange) throws DatabaseException |
final boolean | canDeriveKeyFromValue () |
void | useValue (Object value, DatabaseEntry valueThang, DatabaseEntry checkKeyThang) throws DatabaseException |
Object | makeKey (DatabaseEntry keyThang) throws DatabaseException |
Object | makeValue (DatabaseEntry primaryKeyThang, DatabaseEntry valueThang) throws DatabaseException |
KeyRange | subRange (Object singleKey) throws DatabaseException, KeyRangeException |
KeyRange | subRange (Object beginKey, boolean beginInclusive, Object endKey, boolean endInclusive) throws DatabaseException, KeyRangeException |
This class defines a view and takes care of reading and updating indices, calling bindings, constraining access to a key range, etc.
Definition at line 38 of file DataView.java.
|
Creates a view for a given database and bindings. The initial key range of the view will be open. Definition at line 67 of file DataView.java. References com::sleepycat::collections::CurrentTransaction::getInstanceInternal(), and com::sleepycat::collections::CurrentTransaction::isTxnMode(). |
|
Appends a value and returns the new key. If a key assigner is used it assigns the key, otherwise a QUEUE or RECNO database is required. Definition at line 289 of file DataView.java. References com::sleepycat::collections::PrimaryKeyAssigner::assignKey(), com::sleepycat::collections::KeyRange::check(), com::sleepycat::collections::DataCursor::close(), com::sleepycat::collections::DataCursor::getCursor(), com::sleepycat::collections::CurrentTransaction::isCDBCursorOpen(), useTransaction(), and useValue(). Referenced by com::sleepycat::collections::StoredList::add(), com::sleepycat::collections::StoredList::addAll(), com::sleepycat::collections::StoredMap::append(), and com::sleepycat::collections::StoredList::append(). |
|
Returns whether data keys can be derived from the value/entity binding of this view, which determines whether a value/entity object alone is sufficient for operations that require keys. Definition at line 487 of file DataView.java. |
|
Deletes all records in the current range. Definition at line 349 of file DataView.java. References com::sleepycat::collections::DataCursor::close(), com::sleepycat::collections::DataCursor::delete(), com::sleepycat::collections::DataCursor::getFirst(), and com::sleepycat::collections::DataCursor::getNext(). Referenced by com::sleepycat::collections::StoredContainer::clear(). |
|
Returns a new view with a specified cursor configuration. Definition at line 218 of file DataView.java. References cursorConfig. Referenced by com::sleepycat::collections::StoredContainer::configuredClone(). |
|
Returns the current transaction for the view or null if the environment is non-transactional. Definition at line 230 of file DataView.java. |
|
Returns the environment for the database. Definition at line 257 of file DataView.java. References com::sleepycat::collections::CurrentTransaction::getEnvironment(). |
|
Returns the key thang for a single key range, or null if a single key range is not used. Definition at line 249 of file DataView.java. References com::sleepycat::collections::KeyRange::getSingleKey(). |
|
Returns whether no records are present in the view. Definition at line 274 of file DataView.java. References com::sleepycat::collections::DataCursor::close(), and com::sleepycat::collections::DataCursor::getFirst(). Referenced by com::sleepycat::collections::StoredContainer::isEmpty(). |
|
Returns whether this is a view on a secondary database rather than directly on a primary database. Definition at line 266 of file DataView.java. Referenced by com::sleepycat::collections::StoredValueSet::add(), com::sleepycat::collections::DataCursor::DataCursor(), com::sleepycat::collections::DataCursor::find(), com::sleepycat::collections::DataCursor::getSearchBoth(), com::sleepycat::collections::StoredContainer::isSecondary(), and useKey(). |
|
Returns a cursor for this view that reads only records having the index key values at the specified cursors. Definition at line 406 of file DataView.java. |
|
Returns a cursor for this view that reads only records having the specified index key values. Definition at line 374 of file DataView.java. References com::sleepycat::collections::DataCursor::close(), and com::sleepycat::collections::DataCursor::getSearchKey(). Referenced by com::sleepycat::collections::StoredCollection::join(). |
|
Return a new key-set view derived from this view by setting the entity and value binding to null.
Definition at line 147 of file DataView.java. References entityBinding, and valueBinding. |
|
Converts a key entry to a key object. Definition at line 527 of file DataView.java. References com::sleepycat::bind::EntryBinding::entryToObject(). Referenced by com::sleepycat::collections::DataCursor::getCurrentKey(). |
|
Converts a key-value entry pair to a value object. Definition at line 537 of file DataView.java. References com::sleepycat::bind::EntityBinding::entryToObject(), and com::sleepycat::bind::EntryBinding::entryToObject(). Referenced by com::sleepycat::collections::DataCursor::getCurrentValue(). |
|
Intersects the given range and the current range. Definition at line 565 of file DataView.java. References com::sleepycat::collections::KeyRange::subRange(), and subRange(). |
|
Intersects the given key and the current range. Definition at line 556 of file DataView.java. References com::sleepycat::collections::KeyRange::subRange(). Referenced by com::sleepycat::collections::DataCursor::DataCursor(), subRange(), and valueSetView(). |
|
Return a new value-set view for key range, optionally changing the key binding. Definition at line 204 of file DataView.java. References keyBinding, and setRange(). Referenced by com::sleepycat::collections::StoredList::subList(), com::sleepycat::collections::StoredSortedMap::subMap(), com::sleepycat::collections::StoredSortedValueSet::subSet(), com::sleepycat::collections::StoredSortedKeySet::subSet(), and com::sleepycat::collections::StoredSortedEntrySet::subSet(). |
|
Populates the key entry and returns whether the key is within range. Definition at line 443 of file DataView.java. References isSecondary(), com::sleepycat::bind::EntityBinding::objectToData(), com::sleepycat::bind::EntryBinding::objectToEntry(), and com::sleepycat::bind::EntityBinding::objectToKey(). Referenced by com::sleepycat::collections::DataCursor::getSearchBoth(), com::sleepycat::collections::DataCursor::getSearchKey(), and com::sleepycat::collections::DataCursor::getSearchKeyRange(). |
|
Returns the current transaction if the database is transaction, or null if the database is not transactional or there is no current transaction. Definition at line 342 of file DataView.java. References com::sleepycat::collections::CurrentTransaction::getTransaction(). Referenced by append(). |
|
Populates the value entry and throws an exception if the primary key would be changed via an entity binding. Definition at line 496 of file DataView.java. References com::sleepycat::bind::EntityBinding::objectToData(), com::sleepycat::bind::EntryBinding::objectToEntry(), and com::sleepycat::bind::EntityBinding::objectToKey(). Referenced by append(), com::sleepycat::collections::DataCursor::find(), com::sleepycat::collections::DataCursor::getSearchBoth(), com::sleepycat::collections::DataCursor::putAfter(), com::sleepycat::collections::DataCursor::putBefore(), and com::sleepycat::collections::DataCursor::putCurrent(). |
|
Return a new value-set view for single key range.
Definition at line 187 of file DataView.java. References range, subRange(), and valueSetView(). |
|
Return a new value-set view derived from this view by setting the key binding to null.
Definition at line 164 of file DataView.java. References keyBinding. Referenced by com::sleepycat::collections::StoredMap::duplicates(), and valueSetView(). |