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

com::sleepycat::bind::serial::TupleSerialBinding Class Reference

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

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

Public Member Functions

 TupleSerialBinding (ClassCatalog classCatalog, Class baseClass)
 TupleSerialBinding (SerialBinding dataBinding)
Object entryToObject (DatabaseEntry key, DatabaseEntry data)
void objectToKey (Object object, DatabaseEntry key)
void objectToData (Object object, DatabaseEntry data)
abstract Object entryToObject (TupleInput keyInput, Object dataInput)
abstract void objectToKey (Object object, TupleOutput keyOutput)
abstract Object objectToData (Object object)

Detailed Description

An abstract EntityBinding that treats an entity's key entry as a tuple and its data entry as a serialized object.

This class takes care of serializing and deserializing the data entry, and converting the key entry to/from TupleInput and TupleOutput objects. Its three abstract methods must be implemented by a concrete subclass to convert these objects to/from an entity object.

Author:
Mark Hayes

Definition at line 34 of file TupleSerialBinding.java.


Constructor & Destructor Documentation

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

Creates a tuple-serial entity binding.

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

Definition at line 47 of file TupleSerialBinding.java.

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

Creates a tuple-serial entity binding.

Parameters:
dataBinding is the data binding.

Definition at line 58 of file TupleSerialBinding.java.


Member Function Documentation

abstract Object com::sleepycat::bind::serial::TupleSerialBinding::entryToObject TupleInput  keyInput,
Object  dataInput
[pure 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.

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

Object com::sleepycat::bind::serial::TupleSerialBinding::entryToObject DatabaseEntry  key,
DatabaseEntry  data
[inline]
 

Converts key and data entry buffers into an entity Object.

Parameters:
key is the source key entry.
data is the source data entry.
Returns:
the resulting Object.

Implements com::sleepycat::bind::EntityBinding.

Definition at line 64 of file TupleSerialBinding.java.

References com::sleepycat::bind::tuple::TupleBase::entryToInput(), and com::sleepycat::bind::serial::SerialBinding::entryToObject().

abstract Object com::sleepycat::bind::serial::TupleSerialBinding::objectToData Object  object  )  [pure virtual]
 

Extracts a data object from an entity object.

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

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

void com::sleepycat::bind::serial::TupleSerialBinding::objectToData Object  object,
DatabaseEntry  data
[inline]
 

Extracts the data entry from an entity Object.

Parameters:
object is the source Object.
data is the destination entry buffer.

Implements com::sleepycat::bind::EntityBinding.

Definition at line 79 of file TupleSerialBinding.java.

References com::sleepycat::bind::serial::SerialBinding::objectToEntry().

abstract void com::sleepycat::bind::serial::TupleSerialBinding::objectToKey Object  object,
TupleOutput  keyOutput
[pure 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.

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

void com::sleepycat::bind::serial::TupleSerialBinding::objectToKey Object  object,
DatabaseEntry  key
[inline]
 

Extracts the key entry from an entity Object.

Parameters:
object is the source Object.
key is the destination entry buffer.

Implements com::sleepycat::bind::EntityBinding.

Definition at line 71 of file TupleSerialBinding.java.

References com::sleepycat::bind::tuple::TupleBase::getTupleOutput(), and com::sleepycat::bind::tuple::TupleBase::outputToEntry().


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