Berkeley DB version 4.2.52

## com.sleepycat.bdb.bind.serial
Class SerialSerialBinding

    java.lang.Object
      |
      +--com.sleepycat.bdb.bind.serial.SerialSerialBinding

All Implemented Interfaces:
  EntityBinding

public abstract class SerialSerialBinding
extends Object
implements EntityBinding

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.

- `dataToObject(Object,Object)`
- `objectToKey(Object)`
- `objectToValue(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

### SerialSerialBinding

    public SerialSerialBinding(SerialFormat keyFormat,
                               SerialFormat valueFormat)

  Creates a serial-serial entity binding.

Parameters:
  `keyFormat` - is the key format.
  `valueFormat` - is the value format.

Method Detail

### dataToObject

    public Object dataToObject(DataBuffer key,
                               DataBuffer value)
                        throws IOException

  Description copied from interface: `EntityBinding`
  Converts key and value data buffers into an entity Object.

  Specified by:
    `dataToObject` in interface `EntityBinding`
  Parameters:
    `key` - is the source key data.
    `value` - is the source value data.
  Returns:
    the resulting Object.
    `IOException`

### objectToKey

    public void objectToKey(Object object,
                            DataBuffer key)
                     throws IOException

  Description copied from interface: `EntityBinding`
  Extracts the key data from an entity Object.

  Specified by:
    `objectToKey` in interface `EntityBinding`
  Parameters:
    `object` - is the source Object.
    `key` - is the destination data buffer.
    `IOException`

### objectToValue

    public void objectToValue(Object object,
                              DataBuffer value)
                       throws IOException

  Description copied from interface: `EntityBinding`
  Extracts the value data from an entity Object.

  Specified by:
    `objectToValue` in interface `EntityBinding`
  Parameters:
    `object` - is the source Object.
    `value` - is the destination data buffer.
    `IOException`

### getKeyFormat

    public DataFormat getKeyFormat()

  Description copied from interface: `EntityBinding`
  Returns the format used for the key data of this binding.

  Specified by:
    `getKeyFormat` in interface `EntityBinding`
  Returns:
    the key data format.

### getValueFormat

    public DataFormat getValueFormat()

  Description copied from interface: `EntityBinding`
  Returns the format used for the value data of this binding.

  Specified by:
    `getValueFormat` in interface `EntityBinding`
  Returns:
    the value data format.

### dataToObject

    public abstract Object dataToObject(Object keyInput,
                                        Object valueInput)
                                 throws IOException

  Constructs an entity object from deserialized key and value data objects.

  Parameters:
    `keyInput` - is the deserialized key data object.
    `valueInput` - is the deserialized value data object.
  Returns:
    the entity object constructed from the key and value.
    `IOException`

### objectToKey

    public abstract Object objectToKey(Object object)
                                throws IOException

  Extracts a key object from an entity object.

  Parameters:
    `object` - is the entity object.
  Returns:
    the deserialized key data object.
    `IOException`

### objectToValue

    public abstract Object objectToValue(Object object)
                                  throws IOException

  Extracts a value object from an entity object.

  Parameters:
    `object` - is the entity object.
  Returns:
    the deserialized value data object.
    `IOException`

Berkeley DB version 4.2.52

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.