com.sleepycat.bind.tuple

Class TupleTupleMarshalledBinding

public class TupleTupleMarshalledBinding extends TupleTupleBinding

A concrete TupleTupleBinding that delegates to the MarshalledTupleEntry and MarshalledTupleKeyEntity interfaces of the entity class.

This class calls the methods of the MarshalledTupleEntry interface to convert between the data entry and entity object. It calls the methods of the MarshalledTupleKeyEntity interface to convert between the key entry and the entity object. These two interfaces must both be implemented by the entity class.

Constructor Summary
TupleTupleMarshalledBinding(Class cls)
Creates a tuple-tuple marshalled binding object.
Method Summary
ObjectentryToObject(TupleInput keyInput, TupleInput dataInput)
voidobjectToData(Object object, TupleOutput output)
voidobjectToKey(Object object, TupleOutput output)

Constructor Detail

TupleTupleMarshalledBinding

public TupleTupleMarshalledBinding(Class cls)
Creates a tuple-tuple marshalled binding object.

The given class is used to instantiate entity objects using Class#forName, and therefore must be a public class and have a public no-arguments constructor. It must also implement the MarshalledTupleEntry and MarshalledTupleKeyEntity interfaces.

Parameters: cls is the class of the entity objects.

Method Detail

entryToObject

public Object entryToObject(TupleInput keyInput, TupleInput dataInput)

objectToData

public void objectToData(Object object, TupleOutput output)

objectToKey

public void objectToKey(Object object, TupleOutput output)