Package com.sleepycat.bind.tuple
Class TupleTupleMarshalledBinding<E extends MarshalledTupleEntry & MarshalledTupleKeyEntity>
java.lang.Object
com.sleepycat.bind.tuple.TupleBase<E>
com.sleepycat.bind.tuple.TupleTupleBinding<E>
com.sleepycat.bind.tuple.TupleTupleMarshalledBinding<E>
- All Implemented Interfaces:
EntityBinding<E>
public class TupleTupleMarshalledBinding<E extends MarshalledTupleEntry & MarshalledTupleKeyEntity>
extends TupleTupleBinding<E>
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
ConstructorsConstructorDescriptionCreates a tuple-tuple marshalled binding object. -
Method Summary
Modifier and TypeMethodDescriptionentryToObject(TupleInput keyInput, TupleInput dataInput) Constructs an entity object fromTupleInputkey and data entries.voidobjectToData(E object, TupleOutput output) Extracts a key tuple from an entity object.voidobjectToKey(E object, TupleOutput output) Extracts a key tuple from an entity object.Methods inherited from class com.sleepycat.bind.tuple.TupleTupleBinding
entryToObject, objectToData, objectToKeyMethods inherited from class com.sleepycat.bind.tuple.TupleBase
entryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSize
-
Constructor Details
-
TupleTupleMarshalledBinding
Creates a tuple-tuple marshalled binding object.The given class is used to instantiate entity objects using
Class.newInstance(), and therefore must be a public class and have a public no-arguments constructor. It must also implement theMarshalledTupleEntryandMarshalledTupleKeyEntityinterfaces.- Parameters:
cls- is the class of the entity objects.
-
-
Method Details
-
entryToObject
Description copied from class:TupleTupleBindingConstructs an entity object fromTupleInputkey and data entries.- Specified by:
entryToObjectin classTupleTupleBinding<E extends MarshalledTupleEntry & MarshalledTupleKeyEntity>- Parameters:
keyInput- is theTupleInputkey entry object.dataInput- is theTupleInputdata entry object.- Returns:
- the entity object constructed from the key and data.
-
objectToKey
Description copied from class:TupleTupleBindingExtracts a key tuple from an entity object.- Specified by:
objectToKeyin classTupleTupleBinding<E extends MarshalledTupleEntry & MarshalledTupleKeyEntity>- Parameters:
object- is the entity object.output- is theTupleOutputto which the key should be written.
-
objectToData
Description copied from class:TupleTupleBindingExtracts a key tuple from an entity object.- Specified by:
objectToDatain classTupleTupleBinding<E extends MarshalledTupleEntry & MarshalledTupleKeyEntity>- Parameters:
object- is the entity object.output- is theTupleOutputto which the data should be written.
-