|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface implemented for extracting the index key from primary key and/or value buffers, and for clearing the index key in a value buffer. The implementation of this interface defines a specific index key for use in a database, and that is independent of any bindings that may be used.
Method Summary | |
void |
clearIndexKey(DataBuffer valueData)
Clears the index key in a value buffer. |
void |
extractIndexKey(DataBuffer primaryKeyData,
DataBuffer valueData,
DataBuffer indexKeyData)
Extracts the index key data from primary key and value buffers. |
DataFormat |
getIndexKeyFormat()
Returns the format of the index key data. |
DataFormat |
getPrimaryKeyFormat()
Returns the format of the primary key data or null if the index key data is not derived from the primary key data. |
DataFormat |
getValueFormat()
Returns the format of the value data or null if the index key data is not derived from the value data. |
Method Detail |
public void extractIndexKey(DataBuffer primaryKeyData, DataBuffer valueData, DataBuffer indexKeyData) throws IOException
primaryKeyData
- is the source primary key data, or null if no
primary key data is used to construct the index key, in which case
getPrimaryKeyFormat()
should also return null.valueData
- is the source value data, or null if no value data is
used to construct the index key, in which case getValueFormat()
should also return null.indexKeyData
- is the destination index key buffer. For index keys
which are optionally present, the buffer's length should be set to zero
to indicate that the key is not present or null.
IOException
public void clearIndexKey(DataBuffer valueData) throws IOException
ForeignKeyIndex
is configured with ForeignKeyIndex.ON_DELETE_CLEAR
. It is never called
for index keys that are derived from primary key data, since in this
case ForeignKeyIndex.ON_DELETE_CLEAR
is not
allowed.
valueData
- is the source and destination value data. On entry
this contains the index key to be cleared. It should be changed by this
method such that extractIndexKey(com.sleepycat.bdb.bind.DataBuffer, com.sleepycat.bdb.bind.DataBuffer, com.sleepycat.bdb.bind.DataBuffer)
will extract a null key (set
the buffer length to zero). Other data in the buffer should remain
unchanged.
IOException
public DataFormat getPrimaryKeyFormat()
primaryKeyData
parameter
of extractIndexKey(com.sleepycat.bdb.bind.DataBuffer, com.sleepycat.bdb.bind.DataBuffer, com.sleepycat.bdb.bind.DataBuffer)
.
public DataFormat getValueFormat()
valueData
parameter of extractIndexKey(com.sleepycat.bdb.bind.DataBuffer, com.sleepycat.bdb.bind.DataBuffer, com.sleepycat.bdb.bind.DataBuffer)
.
public DataFormat getIndexKeyFormat()
|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |