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

com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator Class Reference

Inheritance diagram for com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator:

com::sleepycat::bind::serial::TupleSerialKeyCreator com::sleepycat::bind::tuple::TupleBase

Public Member Functions

 TupleSerialMarshalledKeyCreator (TupleSerialMarshalledBinding binding, String keyName)
boolean createSecondaryKey (TupleInput primaryKeyInput, Object dataInput, TupleOutput indexKeyOutput)
Object nullifyForeignKey (Object dataInput)

Detailed Description

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.

Author:
Mark Hayes

Definition at line 24 of file TupleSerialMarshalledKeyCreator.java.


Constructor & Destructor Documentation

com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator::TupleSerialMarshalledKeyCreator TupleSerialMarshalledBinding  binding,
String  keyName
[inline]
 

Creates a tuple-serial marshalled key creator.

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

Definition at line 38 of file TupleSerialMarshalledKeyCreator.java.

References com::sleepycat::bind::serial::TupleSerialBinding::dataBinding.


Member Function Documentation

boolean com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator::createSecondaryKey TupleInput  primaryKeyInput,
Object  dataInput,
TupleOutput  indexKeyOutput
[inline, virtual]
 

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

Parameters:
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.
Returns:
true if a key was created, or false to indicate that the key is not present.

Implements com::sleepycat::bind::serial::TupleSerialKeyCreator.

Definition at line 52 of file TupleSerialMarshalledKeyCreator.java.

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

Object com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator::nullifyForeignKey Object  dataInput  )  [inline]
 

Clears the index key in the deserialized data entry.

On entry the data parameter contains the index key to be cleared. It should be changed by this method such that createSecondaryKey will return false. Other fields in the data object should remain unchanged.

Parameters:
data is the source and destination deserialized data entry.
Returns:
the destination data object, or null to indicate that the key is not present and no change is necessary. The data returned may be the same object passed as the data parameter or a newly created object.

Reimplemented from com::sleepycat::bind::serial::TupleSerialKeyCreator.

Definition at line 68 of file TupleSerialMarshalledKeyCreator.java.

References com::sleepycat::bind::serial::TupleSerialMarshalledBinding::entryToObject(), and com::sleepycat::bind::tuple::MarshalledTupleKeyEntity::nullifyForeignKey().


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