public abstract class TupleTupleBinding extends TupleBase implements EntityBinding
EntityBinding that treats an entity's key entry and
data entry as tuples.
This class takes care of converting the entries to/from TupleInput and TupleOutput objects. Its three abstract methods
must be implemented by a concrete subclass to convert between tuples and
entity objects.
| Constructor and Description |
|---|
TupleTupleBinding()
Creates a tuple-tuple entity binding.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
entryToObject(DatabaseEntry key,
DatabaseEntry data)
Converts key and data entry buffers into an entity Object.
|
abstract java.lang.Object |
entryToObject(TupleInput keyInput,
TupleInput dataInput)
Constructs an entity object from
TupleInput key and data
entries. |
void |
objectToData(java.lang.Object object,
DatabaseEntry data)
Extracts the data entry from an entity Object.
|
abstract void |
objectToData(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object.
|
void |
objectToKey(java.lang.Object object,
DatabaseEntry key)
Extracts the key entry from an entity Object.
|
abstract void |
objectToKey(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object.
|
entryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSizepublic TupleTupleBinding()
public java.lang.Object entryToObject(DatabaseEntry key, DatabaseEntry data)
EntityBindingentryToObject in interface EntityBindingkey - is the source key entry.data - is the source data entry.public void objectToKey(java.lang.Object object,
DatabaseEntry key)
EntityBindingobjectToKey in interface EntityBindingobject - is the source Object.key - is the destination entry buffer.public void objectToData(java.lang.Object object,
DatabaseEntry data)
EntityBindingobjectToData in interface EntityBindingobject - is the source Object.data - is the destination entry buffer.public abstract java.lang.Object entryToObject(TupleInput keyInput, TupleInput dataInput)
TupleInput key and data
entries.keyInput - is the TupleInput key entry object.dataInput - is the TupleInput data entry object.public abstract void objectToKey(java.lang.Object object,
TupleOutput output)
object - is the entity object.output - is the TupleOutput to which the key should be
written.public abstract void objectToData(java.lang.Object object,
TupleOutput output)
object - is the entity object.output - is the TupleOutput to which the data should be
written.