|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.bdb.bind.tuple.TupleTupleBinding
com.sleepycat.bdb.bind.tuple.TupleTupleMarshalledBinding
public class TupleTupleMarshalledBinding
A concrete entity binding that uses the MarshalledTupleData
and the
MarshalledTupleKeyEntity
interfaces. It calls the methods of the
MarshalledTupleData
interface to convert between the value data and
entity object. It calls the methods of the MarshalledTupleKeyEntity
interface to convert between the key data and the entity object. These two
interfaces must both be implemented by the entity class
Field Summary |
---|
Fields inherited from class com.sleepycat.bdb.bind.tuple.TupleTupleBinding |
---|
keyFormat, valueFormat |
Constructor Summary | |
---|---|
TupleTupleMarshalledBinding(TupleFormat keyFormat,
TupleFormat valueFormat,
java.lang.Class cls)
Creates a tuple-tuple marshalled binding object. |
Method Summary | |
---|---|
java.lang.Object |
dataToObject(TupleInput keyInput,
TupleInput valueInput)
Constructs an entity object from TupleInput key and value data
objects. |
void |
objectToKey(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
void |
objectToValue(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
Methods inherited from class com.sleepycat.bdb.bind.tuple.TupleTupleBinding |
---|
dataToObject, getKeyFormat, getValueFormat, objectToKey, objectToValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TupleTupleMarshalledBinding(TupleFormat keyFormat, TupleFormat valueFormat, java.lang.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 MarshalledTupleData
and MarshalledTupleKeyEntity
interfaces.
keyFormat
- is the stored data key format.valueFormat
- is the stored data value format.cls
- is the class of the entity objects.Method Detail |
---|
public java.lang.Object dataToObject(TupleInput keyInput, TupleInput valueInput) throws java.io.IOException
TupleTupleBinding
TupleInput
key and value data
objects.
dataToObject
in class TupleTupleBinding
keyInput
- is the TupleInput
key data object.valueInput
- is the TupleInput
value data object.
java.io.IOException
public void objectToKey(java.lang.Object object, TupleOutput output) throws java.io.IOException
TupleTupleBinding
objectToKey
in class TupleTupleBinding
object
- is the entity object.output
- is the TupleOutput
to which the key should be
written.
java.io.IOException
public void objectToValue(java.lang.Object object, TupleOutput output) throws java.io.IOException
TupleTupleBinding
objectToValue
in class TupleTupleBinding
object
- is the entity object.output
- is the TupleOutput
to which the value should be
written.
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |