public class TupleTupleMarshalledBinding extends TupleTupleBinding
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 and Description |
|---|
TupleTupleMarshalledBinding(java.lang.Class cls)
Creates a tuple-tuple marshalled binding object.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
entryToObject(TupleInput keyInput,
TupleInput dataInput)
Constructs an entity object from
TupleInput key and data
entries. |
void |
objectToData(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object.
|
void |
objectToKey(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object.
|
entryToObject, objectToData, objectToKeyentryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSizepublic TupleTupleMarshalledBinding(java.lang.Class cls)
The given class is used to instantiate entity objects using
Class.forName(java.lang.String), and therefore must be a public class and have a
public no-arguments constructor. It must also implement the MarshalledTupleEntry and MarshalledTupleKeyEntity
interfaces.
cls - is the class of the entity objects.public java.lang.Object entryToObject(TupleInput keyInput, TupleInput dataInput)
TupleTupleBindingTupleInput key and data
entries.entryToObject in class TupleTupleBindingkeyInput - is the TupleInput key entry object.dataInput - is the TupleInput data entry object.public void objectToKey(java.lang.Object object,
TupleOutput output)
TupleTupleBindingobjectToKey in class TupleTupleBindingobject - is the entity object.output - is the TupleOutput to which the key should be
written.public void objectToData(java.lang.Object object,
TupleOutput output)
TupleTupleBindingobjectToData in class TupleTupleBindingobject - is the entity object.output - is the TupleOutput to which the data should be
written.