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

com::sleepycat::bind::serial::TupleSerialKeyCreator Class Reference

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

com::sleepycat::bind::tuple::TupleBase com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator

Public Member Functions

 TupleSerialKeyCreator (ClassCatalog classCatalog, Class dataClass)
 TupleSerialKeyCreator (SerialBinding dataBinding)
abstract boolean createSecondaryKey (TupleInput primaryKeyInput, Object dataInput, TupleOutput indexKeyOutput)
Object nullifyForeignKey (Object data)

Detailed Description

A abstract key creator that uses a tuple key and a serial data entry. This class takes care of serializing and deserializing the data entry, and converting the key 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

Author:
Mark Hayes

Definition at line 33 of file TupleSerialKeyCreator.java.


Constructor & Destructor Documentation

com::sleepycat::bind::serial::TupleSerialKeyCreator::TupleSerialKeyCreator ClassCatalog  classCatalog,
Class  dataClass
[inline]
 

Creates a tuple-serial key creator.

Parameters:
classCatalog is the catalog to hold shared class information and for a database should be a StoredClassCatalog.
dataClass is the data base class.

Definition at line 46 of file TupleSerialKeyCreator.java.

com::sleepycat::bind::serial::TupleSerialKeyCreator::TupleSerialKeyCreator SerialBinding  dataBinding  )  [inline]
 

Creates a tuple-serial key creator.

Parameters:
dataBinding is the data binding.

Definition at line 56 of file TupleSerialKeyCreator.java.


Member Function Documentation

abstract boolean com::sleepycat::bind::serial::TupleSerialKeyCreator::createSecondaryKey TupleInput  primaryKeyInput,
Object  dataInput,
TupleOutput  indexKeyOutput
[pure 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.

Implemented in com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator.

Object com::sleepycat::bind::serial::TupleSerialKeyCreator::nullifyForeignKey Object  data  )  [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 in com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator.

Definition at line 132 of file TupleSerialKeyCreator.java.


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