| 
 | Berkeley DB version 4.3.27 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sleepycat.bind.serial.TupleSerialBinding
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.
| Constructor Summary | |
| TupleSerialBinding(ClassCatalog classCatalog,
                   Class baseClass)Creates a tuple-serial entity binding. | |
| TupleSerialBinding(SerialBinding dataBinding)Creates a tuple-serial entity binding. | |
| Method Summary | |
|  Object | entryToObject(DatabaseEntry key,
              DatabaseEntry data)Converts key and data entry buffers into an entity Object. | 
| abstract  Object | entryToObject(TupleInput keyInput,
              Object dataInput)Constructs an entity object from TupleInputkey entry and
 deserialized data entry objects. | 
| abstract  Object | objectToData(Object object)Extracts a data object from an entity object. | 
|  void | objectToData(Object object,
             DatabaseEntry data)Extracts the data entry from an entity Object. | 
|  void | objectToKey(Object object,
            DatabaseEntry key)Extracts the key entry from an entity Object. | 
| abstract  void | objectToKey(Object object,
            TupleOutput keyOutput)Extracts a key tuple from an entity object. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public TupleSerialBinding(ClassCatalog classCatalog,
                          Class baseClass)
classCatalog - is the catalog to hold shared class information and
 for a database should be a StoredClassCatalog.baseClass - is the base class.public TupleSerialBinding(SerialBinding dataBinding)
dataBinding - is the data binding.| Method Detail | 
public Object entryToObject(DatabaseEntry key,
                            DatabaseEntry data)
EntityBinding
entryToObject in interface EntityBindingkey - is the source key entry.data - is the source data entry.
public void objectToKey(Object object,
                        DatabaseEntry key)
EntityBinding
objectToKey in interface EntityBindingobject - is the source Object.key - is the destination entry buffer.
public void objectToData(Object object,
                         DatabaseEntry data)
EntityBinding
objectToData in interface EntityBindingobject - is the source Object.data - is the destination entry buffer.
public abstract Object entryToObject(TupleInput keyInput,
                                     Object dataInput)
TupleInput key entry and
 deserialized data entry objects.
keyInput - is the TupleInput key entry object.dataInput - is the deserialized data entry object.
public abstract void objectToKey(Object object,
                                 TupleOutput keyOutput)
object - is the entity object.keyOutput - is the TupleOutput to which the key should be
 written.public abstract Object objectToData(Object object)
object - is the entity object.
| 
 | Berkeley DB version 4.3.27 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||