com.sleepycat.bind.tuple
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 Summary | |
|---|---|
| TupleTupleBinding()
Creates a tuple-tuple entity binding. | |
| Method Summary | |
|---|---|
| Object | entryToObject(DatabaseEntry key, DatabaseEntry data) |
| abstract Object | entryToObject(TupleInput keyInput, TupleInput dataInput)
Constructs an entity object from TupleInput key and data
entries.
|
| void | objectToData(Object object, DatabaseEntry data) |
| abstract void | objectToData(Object object, TupleOutput output)
Extracts a key tuple from an entity object.
|
| void | objectToKey(Object object, DatabaseEntry key) |
| abstract void | objectToKey(Object object, TupleOutput output)
Extracts a key tuple from an entity object.
|
Parameters: keyInput is the TupleInput key entry object. dataInput is the TupleInput data entry object.
Returns: the entity object constructed from the key and data.
Parameters: object is the entity object. output is the TupleOutput to which the data should be written.
Parameters: object is the entity object. output is the TupleOutput to which the key should be written.