|
Berkeley DB version 4.2.50 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.sleepycat.bdb.bind.serial.TupleSerialBinding
|
+--com.sleepycat.bdb.bind.serial.TupleSerialMarshalledBinding
A concrete entity binding that uses the MarshalledTupleKeyEntity
interface. It works by calling the methods of the MarshalledTupleKeyEntity interface, which must be implemented by the entity
class, to convert between the key/value data and entity object.
The binding is "tricky" in that it uses the entity class for both the stored data value and the combined entity object. To do this, the entity's key field(s) are transient and are set by the binding after the data object has been deserialized. This avoids the use of a "value" class completely.
MarshalledTupleKeyEntity| Constructor Summary | |
TupleSerialMarshalledBinding(TupleFormat keyFormat,
SerialFormat valueFormat)
Creates a tuple-serial marshalled binding object. |
|
| Method Summary | |
Object |
dataToObject(TupleInput tupleInput,
Object javaInput)
Constructs an entity object from TupleInput key data and
deserialized value data objects. |
void |
objectToKey(Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
Object |
objectToValue(Object object)
Extracts a value object from an entity object. |
| Methods inherited from class com.sleepycat.bdb.bind.serial.TupleSerialBinding |
dataToObject, getKeyFormat, getValueFormat, objectToKey, objectToValue |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TupleSerialMarshalledBinding(TupleFormat keyFormat,
SerialFormat valueFormat)
keyFormat - is the key data format.valueFormat - is the value data format.| Method Detail |
public Object dataToObject(TupleInput tupleInput,
Object javaInput)
throws IOException
TupleSerialBindingTupleInput key data and
deserialized value data objects.
dataToObject in class TupleSerialBindingtupleInput - is the TupleInput key data object.javaInput - is the deserialized value data object.
IOException - if data cannot be read or written.
public void objectToKey(Object object,
TupleOutput output)
throws IOException
TupleSerialBinding
objectToKey in class TupleSerialBindingobject - is the entity object.output - is the TupleOutput to which the key should be
written.
IOException - if data cannot be read or written.
public Object objectToValue(Object object)
throws IOException
TupleSerialBinding
objectToValue in class TupleSerialBindingobject - is the entity object.
IOException - if data cannot be read or written.
|
Berkeley DB version 4.2.50 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||