|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sleepycat.bdb.bind.tuple.TupleTupleBinding
An abstract entity binding that uses a tuple key and a tuple value.
This class takes care of converting the data to/from TupleInput
and
TupleOutput
objects. Its three abstract methods must be implemented
by a concrete subclass to convert between tuples and entity objects.
dataToObject(TupleInput,TupleInput)
objectToKey(Object,TupleOutput)
objectToValue(Object,TupleOutput)
Constructor Summary | |
TupleTupleBinding(TupleFormat keyFormat,
TupleFormat valueFormat)
Creates a tuple-tuple entity binding. |
Method Summary | |
Object |
dataToObject(DataBuffer key,
DataBuffer value)
Converts key and value data buffers into an entity Object. |
abstract Object |
dataToObject(TupleInput keyInput,
TupleInput valueInput)
Constructs an entity object from TupleInput key and value data
objects. |
DataFormat |
getKeyFormat()
Returns the format used for the key data of this binding. |
DataFormat |
getValueFormat()
Returns the format used for the value data of this binding. |
void |
objectToKey(Object object,
DataBuffer key)
Extracts the key data from an entity Object. |
abstract void |
objectToKey(Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
void |
objectToValue(Object object,
DataBuffer value)
Extracts the value data from an entity Object. |
abstract void |
objectToValue(Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TupleTupleBinding(TupleFormat keyFormat, TupleFormat valueFormat)
keyFormat
- is the key format.valueFormat
- is the value format.Method Detail |
public Object dataToObject(DataBuffer key, DataBuffer value) throws IOException
EntityBinding
dataToObject
in interface EntityBinding
key
- is the source key data.value
- is the source value data.
IOException
public void objectToKey(Object object, DataBuffer key) throws IOException
EntityBinding
objectToKey
in interface EntityBinding
object
- is the source Object.key
- is the destination data buffer.
IOException
public void objectToValue(Object object, DataBuffer value) throws IOException
EntityBinding
objectToValue
in interface EntityBinding
object
- is the source Object.value
- is the destination data buffer.
IOException
public DataFormat getKeyFormat()
EntityBinding
getKeyFormat
in interface EntityBinding
public DataFormat getValueFormat()
EntityBinding
getValueFormat
in interface EntityBinding
public abstract Object dataToObject(TupleInput keyInput, TupleInput valueInput) throws IOException
TupleInput
key and value data
objects.
keyInput
- is the TupleInput
key data object.valueInput
- is the TupleInput
value data object.
IOException
public abstract void objectToKey(Object object, TupleOutput output) throws IOException
object
- is the entity object.output
- is the TupleOutput
to which the key should be
written.
IOException
public abstract void objectToValue(Object object, TupleOutput output) throws IOException
object
- is the entity object.output
- is the TupleOutput
to which the value should be
written.
IOException
|
Berkeley DB version 4.2.52 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |