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

com::sleepycat::bind::serial::SerialSerialKeyCreator Class Reference


Public Member Functions

 SerialSerialKeyCreator (ClassCatalog classCatalog, Class primaryKeyClass, Class dataClass, Class indexKeyClass)
 SerialSerialKeyCreator (SerialBinding primaryKeyBinding, SerialBinding dataBinding, SerialBinding indexKeyBinding)
abstract Object createSecondaryKey (Object primaryKey, Object data)
Object nullifyForeignKey (Object data)

Detailed Description

A abstract key creator that uses a serial key and a serial data entry. This class takes care of serializing and deserializing the key and data entry automatically. 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 29 of file SerialSerialKeyCreator.java.


Constructor & Destructor Documentation

com::sleepycat::bind::serial::SerialSerialKeyCreator::SerialSerialKeyCreator ClassCatalog  classCatalog,
Class  primaryKeyClass,
Class  dataClass,
Class  indexKeyClass
[inline]
 

Creates a serial-serial key creator.

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

Definition at line 48 of file SerialSerialKeyCreator.java.

com::sleepycat::bind::serial::SerialSerialKeyCreator::SerialSerialKeyCreator SerialBinding  primaryKeyBinding,
SerialBinding  dataBinding,
SerialBinding  indexKeyBinding
[inline]
 

Creates a serial-serial entity binding.

Parameters:
primaryKeyBinding is the primary key binding.
dataBinding is the data binding.
indexKeyBinding is the index key binding.

Definition at line 67 of file SerialSerialKeyCreator.java.


Member Function Documentation

abstract Object com::sleepycat::bind::serial::SerialSerialKeyCreator::createSecondaryKey Object  primaryKey,
Object  data
[pure virtual]
 

Creates the index key object from primary key and entry objects.

Parameters:
primaryKey is the deserialized source primary key entry, or null if no primary key entry is used to construct the index key.
data is the deserialized source data entry, or null if no data entry is used to construct the index key.
Returns:
the destination index key object, or null to indicate that the key is not present.

Object com::sleepycat::bind::serial::SerialSerialKeyCreator::nullifyForeignKey Object  data  )  [inline]
 

Clears the index key in a data object.

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 data object.
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.

Definition at line 139 of file SerialSerialKeyCreator.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