com.sleepycat.bdb.bind.tuple
Interface MarshalledTupleData


public interface MarshalledTupleData

A marshalling interface implemented by key, value or entity classes that have tuple data. Key classes implement this interface to marshal their key data. Value or entity classes implement this interface to marshal their value data. Implementations of this interface must have a public no arguments contructor so that they can be instantiated by a binding, prior to calling the unmarshalData(com.sleepycat.bdb.bind.tuple.TupleInput) method.

Note that implementing this interface is not necessary when the data is a Java simple type, for example: String, Integer, etc. These types can be used with built-in bindings returned by TupleBinding.getPrimitiveBinding(java.lang.Class, com.sleepycat.bdb.bind.tuple.TupleFormat).

See Also:
TupleTupleMarshalledBinding, TupleTupleMarshalledKeyExtractor

Method Summary
 void marshalData(TupleOutput dataOutput)
          Construct the key or value tuple data from the key or value object.
 void unmarshalData(TupleInput dataInput)
          Construct the key or value object from the key or value tuple data.
 

Method Detail

marshalData

void marshalData(TupleOutput dataOutput)
                 throws java.io.IOException
Construct the key or value tuple data from the key or value object.

Parameters:
dataOutput - is the output tuple.
Throws:
java.io.IOException

unmarshalData

void unmarshalData(TupleInput dataInput)
                   throws java.io.IOException
Construct the key or value object from the key or value tuple data.

Parameters:
dataInput - is the input tuple.
Throws:
java.io.IOException