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

com::sleepycat::bind::serial::TupleSerialMarshalledBinding Class Reference

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

com::sleepycat::bind::serial::TupleSerialBinding com::sleepycat::bind::tuple::TupleBase com::sleepycat::bind::EntityBinding

Public Member Functions

 TupleSerialMarshalledBinding (ClassCatalog classCatalog, Class baseClass)
 TupleSerialMarshalledBinding (SerialBinding dataBinding)
Object entryToObject (TupleInput tupleInput, Object javaInput)
void objectToKey (Object object, TupleOutput output)
Object objectToData (Object object)

Detailed Description

A concrete TupleSerialBinding that delegates to the MarshalledTupleKeyEntity interface of the entity class.

The MarshalledTupleKeyEntity interface must be implemented by the entity class to convert between the key/data entry and entity object.

The binding is "tricky" in that it uses the entity class for both the stored data entry and the combined entity object. To do this, the entity's key field(s) are transient and are set by the binding after the data object has been deserialized. This avoids the use of a "data" class completely.

Author:
Mark Hayes
See also:
MarshalledTupleKeyEntity

Definition at line 32 of file TupleSerialMarshalledBinding.java.


Constructor & Destructor Documentation

com::sleepycat::bind::serial::TupleSerialMarshalledBinding::TupleSerialMarshalledBinding ClassCatalog  classCatalog,
Class  baseClass
[inline]
 

Creates a tuple-serial marshalled binding object.

Parameters:
classCatalog is the catalog to hold shared class information and for a database should be a StoredClassCatalog.
baseClass is the base class for serialized objects stored using this binding -- all objects using this binding must be an instance of this class.

Definition at line 44 of file TupleSerialMarshalledBinding.java.

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

Creates a tuple-serial marshalled binding object.

Parameters:
dataBinding is the binding used for serializing and deserializing the entity object.

Definition at line 56 of file TupleSerialMarshalledBinding.java.


Member Function Documentation

Object com::sleepycat::bind::serial::TupleSerialMarshalledBinding::entryToObject TupleInput  tupleInput,
Object  javaInput
[inline, virtual]
 

Constructs an entity object from TupleInput key entry and deserialized data entry objects.

Parameters:
keyInput is the TupleInput key entry object.
dataInput is the deserialized data entry object.
Returns:
the entity object constructed from the key and data.

Implements com::sleepycat::bind::serial::TupleSerialBinding.

Definition at line 62 of file TupleSerialMarshalledBinding.java.

References com::sleepycat::bind::tuple::MarshalledTupleKeyEntity::unmarshalPrimaryKey().

Referenced by com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator::createSecondaryKey(), and com::sleepycat::bind::serial::TupleSerialMarshalledKeyCreator::nullifyForeignKey().

Object com::sleepycat::bind::serial::TupleSerialMarshalledBinding::objectToData Object  object  )  [inline, virtual]
 

Extracts a data object from an entity object.

Parameters:
object is the entity object.
Returns:
the deserialized data object.

Implements com::sleepycat::bind::serial::TupleSerialBinding.

Definition at line 86 of file TupleSerialMarshalledBinding.java.

void com::sleepycat::bind::serial::TupleSerialMarshalledBinding::objectToKey Object  object,
TupleOutput  output
[inline, virtual]
 

Extracts a key tuple from an entity object.

Parameters:
object is the entity object.
keyOutput is the TupleOutput to which the key should be written.

Implements com::sleepycat::bind::serial::TupleSerialBinding.

Definition at line 77 of file TupleSerialMarshalledBinding.java.

References com::sleepycat::bind::tuple::MarshalledTupleKeyEntity::marshalPrimaryKey().


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