Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

com::sleepycat::bind::tuple::TupleTupleMarshalledKeyCreator Class Reference

Inheritance diagram for com::sleepycat::bind::tuple::TupleTupleMarshalledKeyCreator:

com::sleepycat::bind::tuple::TupleTupleKeyCreator com::sleepycat::bind::tuple::TupleBase

Public Member Functions

 TupleTupleMarshalledKeyCreator (TupleTupleMarshalledBinding binding, String keyName)
boolean createSecondaryKey (TupleInput primaryKeyInput, TupleInput dataInput, TupleOutput indexKeyOutput)
boolean nullifyForeignKey (TupleInput dataInput, TupleOutput dataOutput)

Detailed Description

A concrete key creator that works in conjunction with a TupleTupleMarshalledBinding. This key creator works by calling the methods of the MarshalledTupleKeyEntity interface to create and clear the index key.

Note that a marshalled tuple key creator is somewhat less efficient than a non-marshalled key tuple creator because more conversions are needed. A marshalled key creator must convert the entry to an object in order to create the key, while an unmarshalled key creator does not.

Author:
Mark Hayes

Definition at line 25 of file TupleTupleMarshalledKeyCreator.java.


Constructor & Destructor Documentation

com::sleepycat::bind::tuple::TupleTupleMarshalledKeyCreator::TupleTupleMarshalledKeyCreator TupleTupleMarshalledBinding  binding,
String  keyName
[inline]
 

Creates a tuple-tuple marshalled key creator.

Parameters:
binding is the binding used for the tuple-tuple entity.
keyName is the key name passed to the MarshalledTupleKeyEntity#marshalSecondaryKey method to identify the index key.

Definition at line 39 of file TupleTupleMarshalledKeyCreator.java.


Member Function Documentation

boolean com::sleepycat::bind::tuple::TupleTupleMarshalledKeyCreator::createSecondaryKey TupleInput  primaryKeyInput,
TupleInput  dataInput,
TupleOutput  indexKeyOutput
[inline, virtual]
 

Creates the index key from primary key tuple and data tuple.

Parameters:
primaryKeyInput is the TupleInput for the primary key entry.
dataInput is the TupleInput for the data entry.
indexKeyOutput is the destination index key tuple.
Returns:
true if a key was created, or false to indicate that the key is not present.

Implements com::sleepycat::bind::tuple::TupleTupleKeyCreator.

Definition at line 47 of file TupleTupleMarshalledKeyCreator.java.

References com::sleepycat::bind::tuple::TupleTupleMarshalledBinding::entryToObject(), and com::sleepycat::bind::tuple::MarshalledTupleKeyEntity::marshalSecondaryKey().

boolean com::sleepycat::bind::tuple::TupleTupleMarshalledKeyCreator::nullifyForeignKey TupleInput  dataInput,
TupleOutput  dataOutput
[inline]
 

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 createSecondaryKey will return false. Other fields in the data object should remain unchanged.

Parameters:
dataInput is the TupleInput for the data entry.
dataOutput is the destination TupleOutput.
Returns:
true if the key was cleared, or false to indicate that the key is not present and no change is necessary.

Reimplemented from com::sleepycat::bind::tuple::TupleTupleKeyCreator.

Definition at line 62 of file TupleTupleMarshalledKeyCreator.java.

References com::sleepycat::bind::tuple::TupleTupleMarshalledBinding::entryToObject(), com::sleepycat::bind::tuple::MarshalledTupleKeyEntity::nullifyForeignKey(), and com::sleepycat::bind::tuple::TupleTupleMarshalledBinding::objectToData().


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:15:00 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2