|
Berkeley DB Java Edition version 1.5.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sleepycat.bind.tuple.TupleTupleBinding | +--com.sleepycat.bind.tuple.TupleTupleMarshalledBinding
A concrete TupleTupleBinding
that delegates to the
MarshalledTupleEntry
and
MarshalledTupleKeyEntity
interfaces of the entity class.
This class calls the methods of the MarshalledTupleEntry
interface to convert between the data entry and entity object. It calls the
methods of the MarshalledTupleKeyEntity
interface to convert between
the key entry and the entity object. These two interfaces must both be
implemented by the entity class.
Constructor Summary | |
TupleTupleMarshalledBinding(Class cls)
Creates a tuple-tuple marshalled binding object. |
Method Summary | |
Object |
entryToObject(TupleInput keyInput,
TupleInput dataInput)
Constructs an entity object from TupleInput key and data
entries. |
void |
objectToData(Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
void |
objectToKey(Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
Methods inherited from class com.sleepycat.bind.tuple.TupleTupleBinding |
entryToObject, objectToData, objectToKey |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TupleTupleMarshalledBinding(Class cls)
The given class is used to instantiate entity objects using
Class.forName(java.lang.String)
, and therefore must be a public class and have a
public no-arguments constructor. It must also implement the MarshalledTupleEntry
and MarshalledTupleKeyEntity
interfaces.
cls
- is the class of the entity objects.Method Detail |
public Object entryToObject(TupleInput keyInput, TupleInput dataInput)
TupleTupleBinding
TupleInput
key and data
entries.
entryToObject
in class TupleTupleBinding
keyInput
- is the TupleInput
key entry object.dataInput
- is the TupleInput
data entry object.
public void objectToKey(Object object, TupleOutput output)
TupleTupleBinding
objectToKey
in class TupleTupleBinding
object
- is the entity object.output
- is the TupleOutput
to which the key should be
written.public void objectToData(Object object, TupleOutput output)
TupleTupleBinding
objectToData
in class TupleTupleBinding
object
- is the entity object.output
- is the TupleOutput
to which the data should be
written.
|
Berkeley DB Java Edition version 1.5.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |