|
Berkeley
DB Java Edition version 1.7.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.bind.serial.TupleSerialKeyCreator
com.sleepycat.bind.serial.TupleSerialMarshalledKeyCreator
A concrete key creator that works in conjunction with a TupleSerialMarshalledBinding
.
This key creator works by calling the methods of the MarshalledTupleKeyEntity
interface to create and clear the index key fields.
Constructor Summary | |
TupleSerialMarshalledKeyCreator(TupleSerialMarshalledBinding binding,
String keyName) Creates a tuple-serial marshalled key creator. |
Method Summary | |
boolean |
createSecondaryKey(TupleInput primaryKeyInput,
Object dataInput, TupleOutput indexKeyOutput)
Creates the index key entry from primary key tuple entry and deserialized data entry. |
Object |
nullifyForeignKey(Object dataInput) Clears the index key in the deserialized data entry. |
Methods inherited from class com.sleepycat.bind.serial.TupleSerialKeyCreator |
createSecondaryKey,
nullifyForeignKey |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TupleSerialMarshalledKeyCreator(TupleSerialMarshalledBinding binding, String keyName)
binding
- is the binding used for the
tuple-serial entity.
keyName
- is the key name passed to the MarshalledTupleKeyEntity.marshalSecondaryKey(java.lang.String,
com.sleepycat.bind.tuple.TupleOutput)
method to identify the index key.
Method Detail |
public boolean createSecondaryKey(TupleInput primaryKeyInput, Object dataInput, TupleOutput indexKeyOutput)
TupleSerialKeyCreator
createSecondaryKey
in class TupleSerialKeyCreator
primaryKeyInput
- is the TupleInput
for the primary key entry, or null if no primary key entry is used to
construct the index key.
dataInput
- is the deserialized data entry, or
null if no data entry is used to construct the index key.
indexKeyOutput
- is the destination index key
tuple. For index keys which are optionally present, no tuple entry
should be output to indicate that the key is not present or null.
public Object nullifyForeignKey(Object dataInput)
TupleSerialKeyCreator
On entry the data parameter contains the index key to be
cleared. It should be changed by this method such that TupleSerialKeyCreator.createSecondaryKey(com.sleepycat.je.SecondaryDatabase,
com.sleepycat.je.DatabaseEntry, com.sleepycat.je.DatabaseEntry,
com.sleepycat.je.DatabaseEntry)
will return false. Other fields in the
data object should remain unchanged.
nullifyForeignKey
in class TupleSerialKeyCreator
dataInput
- is the source and destination
deserialized data entry.
|
Berkeley
DB Java Edition version 1.7.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |