|
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.TupleBinding | +--com.sleepycat.bind.tuple.TupleMarshalledBinding
A concrete TupleBinding
that delegates to the
MarshalledTupleEntry
interface of the data or key object.
This class works by calling the methods of the MarshalledTupleEntry
interface, which must be implemented by the key or
data class, to convert between the key or data entry and the object.
Constructor Summary | |
TupleMarshalledBinding(Class cls)
Creates a tuple marshalled binding object. |
Method Summary | |
Object |
entryToObject(TupleInput input)
Constructs a key or data object from a TupleInput entry. |
void |
objectToEntry(Object object,
TupleOutput output)
Converts a key or data object to a tuple entry. |
Methods inherited from class com.sleepycat.bind.tuple.TupleBinding |
entryToInput, entryToObject, getPrimitiveBinding, inputToEntry, newOutput, newOutput, objectToEntry, outputToEntry |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TupleMarshalledBinding(Class cls)
The given class is used to instantiate key or data 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
interface.
cls
- is the class of the key or data objects.Method Detail |
public Object entryToObject(TupleInput input)
TupleBinding
TupleInput
entry.
entryToObject
in class TupleBinding
input
- is the tuple key or data entry.
public void objectToEntry(Object object, TupleOutput output)
TupleBinding
objectToEntry
in class TupleBinding
object
- is the key or data object.output
- is the tuple entry to which the key or 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 |