Package com.sleepycat.bind.tuple
Class TupleTupleBinding<E>
java.lang.Object
com.sleepycat.bind.tuple.TupleBase<E>
com.sleepycat.bind.tuple.TupleTupleBinding<E>
- All Implemented Interfaces:
EntityBinding<E>
- Direct Known Subclasses:
TupleTupleMarshalledBinding
An abstract
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract EentryToObject(TupleInput keyInput, TupleInput dataInput) Constructs an entity object fromTupleInputkey and data entries.entryToObject(DatabaseEntry key, DatabaseEntry data) Converts key and data entry buffers into an entity Object.abstract voidobjectToData(E object, TupleOutput output) Extracts a key tuple from an entity object.voidobjectToData(E object, DatabaseEntry data) Extracts the data entry from an entity Object.abstract voidobjectToKey(E object, TupleOutput output) Extracts a key tuple from an entity object.voidobjectToKey(E object, DatabaseEntry key) Extracts the key entry from an entity Object.Methods inherited from class com.sleepycat.bind.tuple.TupleBase
entryToInput, getTupleBufferSize, getTupleOutput, inputToEntry, newOutput, newOutput, outputToEntry, setTupleBufferSize
-
Constructor Details
-
TupleTupleBinding
public TupleTupleBinding()Creates a tuple-tuple entity binding.
-
-
Method Details
-
entryToObject
Description copied from interface:EntityBindingConverts key and data entry buffers into an entity Object.- Specified by:
entryToObjectin interfaceEntityBinding<E>- Parameters:
key- is the source key entry.data- is the source data entry.- Returns:
- the resulting Object.
-
objectToKey
Description copied from interface:EntityBindingExtracts the key entry from an entity Object.- Specified by:
objectToKeyin interfaceEntityBinding<E>- Parameters:
object- is the source Object.key- is the destination entry buffer.
-
objectToData
Description copied from interface:EntityBindingExtracts the data entry from an entity Object.- Specified by:
objectToDatain interfaceEntityBinding<E>- Parameters:
object- is the source Object.data- is the destination entry buffer.
-
entryToObject
Constructs an entity object fromTupleInputkey and data entries.- Parameters:
keyInput- is theTupleInputkey entry object.dataInput- is theTupleInputdata entry object.- Returns:
- the entity object constructed from the key and data.
-
objectToKey
Extracts a key tuple from an entity object.- Parameters:
object- is the entity object.output- is theTupleOutputto which the key should be written.
-
objectToData
Extracts a key tuple from an entity object.- Parameters:
object- is the entity object.output- is theTupleOutputto which the data should be written.
-