| java.lang.Object com.sleepycat.bind.tuple.TupleBase com.sleepycat.bind.tuple.TupleTupleKeyCreator
All known Subclasses: com.sleepycat.bind.tuple.TupleTupleMarshalledKeyCreator,
TupleTupleKeyCreator | abstract public class TupleTupleKeyCreator extends TupleBase implements SecondaryKeyCreator,ForeignKeyNullifier(Code) | | An abstract key creator that uses a tuple key and a tuple data entry. This
class takes care of converting the key and data entry to/from
TupleInput and
TupleOutput objects.
The following abstract method must be implemented by a concrete subclass
to create the index key using these objects
If
com.sleepycat.je.ForeignKeyDeleteAction.NULLIFY was
specified when opening the secondary database, the following method must be
overridden to nullify the foreign index key. If NULLIFY was not specified,
this method need not be overridden.
If
com.sleepycat.je.ForeignKeyDeleteAction.NULLIFY was
specified when creating the secondary, this method is called when the
entity for this foreign key is deleted. If NULLIFY was not specified,
this method will not be called and may always return false.
author: Mark Hayes |
TupleTupleKeyCreator | public TupleTupleKeyCreator()(Code) | | Creates a tuple-tuple key creator.
|
createSecondaryKey | abstract public boolean createSecondaryKey(TupleInput primaryKeyInput, TupleInput dataInput, TupleOutput indexKeyOutput)(Code) | | Creates the index key from primary key tuple and data tuple.
Parameters: primaryKeyInput - is the TupleInput for the primary keyentry. Parameters: dataInput - is the TupleInput for the data entry. Parameters: indexKeyOutput - is the destination index key tuple. true if a key was created, or false to indicate that the key isnot present. |
nullifyForeignKey | public boolean nullifyForeignKey(TupleInput dataInput, TupleOutput dataOutput)(Code) | | Clears the index key in the tuple data entry. The dataInput should be
read and then written to the dataOutput, clearing the index key in the
process.
The secondary key should be output or removed by this method such
that
TupleTupleKeyCreator.createSecondaryKey will return false. Other fields in the
data object should remain unchanged.
Parameters: dataInput - is the TupleInput for the data entry. Parameters: dataOutput - is the destination TupleOutput. true if the key was cleared, or false to indicate that the keyis not present and no change is necessary. |
|
|