| 
 | Berkeley DB version 4.2.52 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.sleepycat.bdb.DataIndex
Represents a Berkeley DB secondary index.  An index is always attached to a
 single DataStore when it is constructed.  An index is typically
 accessed by passing it to the constructor of one of the collection classes
 in the com.sleepycat.bdb.collection package.  For example:
 
Db db = new Db(env, 0); db.setFlags(Db.DB_DUPSORT); db.open(null, "index.db", null, Db.DB_BTREE, dbOpenFlags, 0); DataIndex index = new DataIndex(store, db, keyFormat, keyExtractor); StoredMap map = new StoredMap(index, keyBinding, valueBinding, writeAllowed);
All access methods may be used with BDB. However, some access methods may only be used with certain types of collection views, and some access methods impose restrictions on the way collection views are used.
| Constructor Summary | |
| DataIndex(DataStore store,
          Db db,
          DataFormat keyFormat,
          KeyExtractor keyExtractor)Creates an index from a previously opened Db object. | |
| Method Summary | |
|  KeyExtractor | getKeyExtractor()Returns the key extractor associated with this index. | 
|  DataFormat | getKeyFormat()Returns the key format associated with this index. | 
|  DataStore | getStore()Returns the store associated with this index. | 
|  String | toString()Returns a printable string identifying the file and database name of the index. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public DataIndex(DataStore store,
                 Db db,
                 DataFormat keyFormat,
                 KeyExtractor keyExtractor)
store - the store to be indexed and also specifies the
 environment that was used to create the Db object.db - the previously opened Db object.keyFormat - the data format for keys.keyExtractor - an object for extracting the index key from primary
 key and/or value buffers, and for clearing the index key in a value
 buffer.
IllegalArgumentException - if a format mismatch is detected
 between the index and the store, or if unsorted duplicates were
 specified for the index Db.| Method Detail | 
public final DataStore getStore()
public final DataFormat getKeyFormat()
public final KeyExtractor getKeyExtractor()
public String toString()
toString in class Object| 
 | Berkeley DB version 4.2.52 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||