com.sleepycat.bdb.bind
Interface EntityBinding

All Known Implementing Classes:
SerialSerialBinding, TupleSerialBinding, TupleSerialMarshalledBinding, TupleTupleBinding, TupleTupleMarshalledBinding

public interface EntityBinding

The interface implemented by all entity or key/data-to-object bindings.


Method Summary
 java.lang.Object dataToObject(DataBuffer key, DataBuffer value)
          Converts key and value data buffers into an entity Object.
 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.
 void objectToKey(java.lang.Object object, DataBuffer key)
          Extracts the key data from an entity Object.
 void objectToValue(java.lang.Object object, DataBuffer value)
          Extracts the value data from an entity Object.
 

Method Detail

dataToObject

java.lang.Object dataToObject(DataBuffer key,
                              DataBuffer value)
                              throws java.io.IOException
Converts key and value data buffers into an entity Object.

Parameters:
key - is the source key data.
value - is the source value data.
Returns:
the resulting Object.
Throws:
java.io.IOException

objectToKey

void objectToKey(java.lang.Object object,
                 DataBuffer key)
                 throws java.io.IOException
Extracts the key data from an entity Object.

Parameters:
object - is the source Object.
key - is the destination data buffer.
Throws:
java.io.IOException

objectToValue

void objectToValue(java.lang.Object object,
                   DataBuffer value)
                   throws java.io.IOException
Extracts the value data from an entity Object.

Parameters:
object - is the source Object.
value - is the destination data buffer.
Throws:
java.io.IOException

getKeyFormat

DataFormat getKeyFormat()
Returns the format used for the key data of this binding.

Returns:
the key data format.

getValueFormat

DataFormat getValueFormat()
Returns the format used for the value data of this binding.

Returns:
the value data format.