| java.lang.Object com.sleepycat.collections.DataView
DataView | final class DataView implements Cloneable(Code) | | Represents a Berkeley DB database and adds support for indices, bindings and
key ranges.
This class defines a view and takes care of reading and updating indices,
calling bindings, constraining access to a key range, etc.
author: Mark Hayes |
Method Summary | |
OperationStatus | append(Object value, Object[] retPrimaryKey, Object[] retValue) Appends a value and returns the new key. | final boolean | canDeriveKeyFromValue() 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. | void | clear() Deletes all records in the current range. | DataView | configuredView(CursorConfig config) Returns a new view with a specified cursor configuration. | DataView | duplicatesView(Object secondaryKey, EntryBinding primaryKeyBinding) Return a new duplicates view for a given secondary key. | CurrentTransaction | getCurrentTxn() Returns the current transaction for the view or null if the environment
is non-transactional. | final Environment | getEnv() Returns the environment for the database. | DatabaseEntry | getSingleKeyThang() Returns the key thang for a single key range, or null if a single key
range is not used. | boolean | isEmpty() Returns whether no records are present in the view. | final boolean | isSecondary() Returns whether this is a view on a secondary database rather
than directly on a primary database. | DataCursor | join(DataView[] indexViews, Object[] indexKeys, JoinConfig joinConfig) Returns a cursor for this view that reads only records having the
specified index key values. | DataCursor | join(DataCursor[] indexCursors, JoinConfig joinConfig) Returns a cursor for this view that reads only records having the
index key values at the specified cursors. | DataView | keySetView() Return a new key-set view derived from this view by setting the
entity and value binding to null. | Object | makeKey(DatabaseEntry keyThang, DatabaseEntry priKeyThang) Converts a key entry to a key object. | Object | makeValue(DatabaseEntry primaryKeyThang, DatabaseEntry valueThang) Converts a key-value entry pair to a value object. | KeyRange | subRange(KeyRange useRange, Object singleKey) Intersects the given key and the current range. | KeyRange | subRange(KeyRange useRange, Object beginKey, boolean beginInclusive, Object endKey, boolean endInclusive) Intersects the given range and the current range. | DataView | subView(Object beginKey, boolean beginInclusive, Object endKey, boolean endInclusive, EntryBinding keyBinding) Return a new value-set view for key range, optionally changing
the key binding. | boolean | useKey(Object key, Object value, DatabaseEntry keyThang, KeyRange checkRange) Populates the key entry and returns whether the key is within range. | KeyRange | useSubRange() Returns the range to use for sub-ranges. | Transaction | useTransaction() Returns the current transaction if the database is transaction, or null
if the database is not transactional or there is no current transaction. | void | useValue(Object value, DatabaseEntry valueThang, DatabaseEntry checkKeyThang) Populates the value entry and throws an exception if the primary key
would be changed via an entity binding. | DataView | valueSetView() Return a new value-set view derived from this view by setting the
key binding to null. | DataView | valueSetView(Object singleKey) Return a new value-set view for single key range.
Parameters: singleKey - the single key value. |
btreeRecNumAccess | boolean btreeRecNumAccess(Code) | | |
btreeRecNumDb | boolean btreeRecNumDb(Code) | | |
dupsAllowed | boolean dupsAllowed(Code) | | |
dupsOrdered | boolean dupsOrdered(Code) | | |
dupsView | boolean dupsView(Code) | | |
keysRenumbered | boolean keysRenumbered(Code) | | |
readUncommittedAllowed | boolean readUncommittedAllowed(Code) | | |
recNumAccess | boolean recNumAccess(Code) | | |
recNumAllowed | boolean recNumAllowed(Code) | | |
recNumRenumber | boolean recNumRenumber(Code) | | |
transactional | boolean transactional(Code) | | |
writeAllowed | boolean writeAllowed(Code) | | |
canDeriveKeyFromValue | final boolean canDeriveKeyFromValue()(Code) | | 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.
|
getCurrentTxn | CurrentTransaction getCurrentTxn()(Code) | | Returns the current transaction for the view or null if the environment
is non-transactional.
|
getSingleKeyThang | DatabaseEntry getSingleKeyThang()(Code) | | Returns the key thang for a single key range, or null if a single key
range is not used.
|
isSecondary | final boolean isSecondary()(Code) | | Returns whether this is a view on a secondary database rather
than directly on a primary database.
|
keySetView | DataView keySetView()(Code) | | Return a new key-set view derived from this view by setting the
entity and value binding to null.
the derived view. |
useSubRange | KeyRange useSubRange() throws DatabaseException(Code) | | Returns the range to use for sub-ranges. Returns range if this is not a
dupsView, or the dupsRange if this is a dupsView, creating dupsRange if
necessary.
|
useTransaction | Transaction useTransaction()(Code) | | Returns the current transaction if the database is transaction, or null
if the database is not transactional or there is no current transaction.
|
valueSetView | DataView valueSetView()(Code) | | Return a new value-set view derived from this view by setting the
key binding to null.
the derived view. |
|
|