|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.persist.BasicIndex<SK,PK>
com.sleepycat.persist.KeysIndex<SK,PK>
class KeysIndex<SK,PK>
The EntityIndex returned by SecondaryIndex.keysIndex(). This index maps secondary key to primary key. In Berkeley DB internal terms, this is a secondary database that is opened without associating it with a primary.
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.persist.BasicIndex |
|---|
db, emptyRange, entityAdapter, keyAdapter, keyBinding, keyClass, NO_RETURN_ENTRY, transactional |
| Constructor Summary | |
|---|---|
KeysIndex(Database db,
Class<SK> keyClass,
EntryBinding keyBinding,
Class<PK> pkeyClass,
EntryBinding pkeyBinding)
|
|
| Method Summary | |
|---|---|
PK |
get(SK key)
Gets an entity via a key of this index. |
PK |
get(Transaction txn,
SK key,
LockMode lockMode)
Gets an entity via a key of this index. |
Map<SK,PK> |
map()
Returns a standard Java map based on this entity index. |
SortedMap<SK,PK> |
sortedMap()
Returns a standard Java sorted map based on this entity index. |
| Methods inherited from class com.sleepycat.persist.BasicIndex |
|---|
contains, contains, delete, delete, entities, entities, entities, entities, keys, keys, keys, keys |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
KeysIndex(Database db,
Class<SK> keyClass,
EntryBinding keyBinding,
Class<PK> pkeyClass,
EntryBinding pkeyBinding)
throws DatabaseException
DatabaseException| Method Detail |
|---|
public PK get(SK key)
throws DatabaseException
EntityIndexThe operation will not be transaction protected, and LockMode.DEFAULT is used implicitly.
key - the key to search for.
DatabaseException
public PK get(Transaction txn,
SK key,
LockMode lockMode)
throws DatabaseException
EntityIndex
txn - the transaction used to protect this operation, or null
if the operation should not be transaction protected.key - the key to search for.lockMode - the lock mode to use for this operation, or null to
use LockMode.DEFAULT.
DatabaseExceptionpublic Map<SK,PK> map()
EntityIndexStoredMap returned is defined by the Collections API. Stored collections conform
to the standard Java collections framework interface.
public SortedMap<SK,PK> sortedMap()
EntityIndexStoredSortedMap returned is defined by the Collections API. Stored collections conform
to the standard Java collections framework interface.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||