| 
 | Berkeley DB version 4.2.52 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.sleepycat.bdb.bind.serial.SerialSerialBinding
An abstract entity binding that uses a serial key and a serial value. This class takes care of serializing and deserializing the key and value data automatically. Its three abstract methods must be implemented by a concrete subclass to convert the deserialized objects to/from an entity object.
| Constructor Summary | |
| SerialSerialBinding(SerialFormat keyFormat,
                    SerialFormat valueFormat)Creates a serial-serial entity binding. | |
| Method Summary | |
|  Object | dataToObject(DataBuffer key,
             DataBuffer value)Converts key and value data buffers into an entity Object. | 
| abstract  Object | dataToObject(Object keyInput,
             Object valueInput)Constructs an entity object from deserialized key and value data objects. | 
|  DataFormat | getKeyFormat()Returns the format used for the key data of this binding. | 
|  DataFormat | getValueFormat()Returns the format used for the value data of this binding. | 
| abstract  Object | objectToKey(Object object)Extracts a key object from an entity object. | 
|  void | objectToKey(Object object,
            DataBuffer key)Extracts the key data from an entity Object. | 
| abstract  Object | objectToValue(Object object)Extracts a value object from an entity object. | 
|  void | objectToValue(Object object,
              DataBuffer value)Extracts the value data from an entity Object. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public SerialSerialBinding(SerialFormat keyFormat,
                           SerialFormat valueFormat)
keyFormat - is the key format.valueFormat - is the value format.| Method Detail | 
public Object dataToObject(DataBuffer key,
                           DataBuffer value)
                    throws IOException
EntityBinding
dataToObject in interface EntityBindingkey - is the source key data.value - is the source value data.
IOException
public void objectToKey(Object object,
                        DataBuffer key)
                 throws IOException
EntityBinding
objectToKey in interface EntityBindingobject - is the source Object.key - is the destination data buffer.
IOException
public void objectToValue(Object object,
                          DataBuffer value)
                   throws IOException
EntityBinding
objectToValue in interface EntityBindingobject - is the source Object.value - is the destination data buffer.
IOExceptionpublic DataFormat getKeyFormat()
EntityBinding
getKeyFormat in interface EntityBindingpublic DataFormat getValueFormat()
EntityBinding
getValueFormat in interface EntityBinding
public abstract Object dataToObject(Object keyInput,
                                    Object valueInput)
                             throws IOException
keyInput - is the deserialized key data object.valueInput - is the deserialized value data object.
IOException
public abstract Object objectToKey(Object object)
                            throws IOException
object - is the entity object.
IOException
public abstract Object objectToValue(Object object)
                              throws IOException
object - is the entity object.
IOException| 
 | Berkeley DB version 4.2.52 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||