|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.bdb.bind.serial.TupleSerialBinding
public abstract class TupleSerialBinding
A abstract entity binding that uses a tuple key and a serial value. This
class takes care of serializing and deserializing the value data,
and converting the key data to/from TupleInput
and TupleOutput
objects. Its three abstract methods must be implemented by a
concrete subclass to convert these objects to/from an entity object.
Field Summary | |
---|---|
protected TupleFormat |
keyFormat
|
protected SerialFormat |
valueFormat
|
Constructor Summary | |
---|---|
TupleSerialBinding(TupleFormat keyFormat,
SerialFormat valueFormat)
Creates a tuple-serial entity binding. |
Method Summary | |
---|---|
java.lang.Object |
dataToObject(DataBuffer key,
DataBuffer value)
Converts key and value data buffers into an entity Object. |
abstract java.lang.Object |
dataToObject(TupleInput keyInput,
java.lang.Object valueInput)
Constructs an entity object from TupleInput key data and
deserialized 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(java.lang.Object object,
DataBuffer key)
Extracts the key data from an entity Object. |
abstract void |
objectToKey(java.lang.Object object,
TupleOutput output)
Extracts a key tuple from an entity object. |
abstract java.lang.Object |
objectToValue(java.lang.Object object)
Extracts a value object from an entity object. |
void |
objectToValue(java.lang.Object object,
DataBuffer value)
Extracts the value data from an entity Object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TupleFormat keyFormat
protected SerialFormat valueFormat
Constructor Detail |
---|
public TupleSerialBinding(TupleFormat keyFormat, SerialFormat valueFormat)
keyFormat
- is the key format.valueFormat
- is the value format.Method Detail |
---|
public java.lang.Object dataToObject(DataBuffer key, DataBuffer value) throws java.io.IOException
EntityBinding
dataToObject
in interface EntityBinding
key
- is the source key data.value
- is the source value data.
java.io.IOException
public void objectToKey(java.lang.Object object, DataBuffer key) throws java.io.IOException
EntityBinding
objectToKey
in interface EntityBinding
object
- is the source Object.key
- is the destination data buffer.
java.io.IOException
public void objectToValue(java.lang.Object object, DataBuffer value) throws java.io.IOException
EntityBinding
objectToValue
in interface EntityBinding
object
- is the source Object.value
- is the destination data buffer.
java.io.IOException
public DataFormat getKeyFormat()
EntityBinding
getKeyFormat
in interface EntityBinding
public DataFormat getValueFormat()
EntityBinding
getValueFormat
in interface EntityBinding
public abstract java.lang.Object dataToObject(TupleInput keyInput, java.lang.Object valueInput) throws java.io.IOException
TupleInput
key data and
deserialized value data objects.
keyInput
- is the TupleInput
key data object.valueInput
- is the deserialized value data object.
java.io.IOException
- if data cannot be read or written.public abstract void objectToKey(java.lang.Object object, TupleOutput output) throws java.io.IOException
object
- is the entity object.output
- is the TupleOutput
to which the key should be
written.
java.io.IOException
- if data cannot be read or written.public abstract java.lang.Object objectToValue(java.lang.Object object) throws java.io.IOException
object
- is the entity object.
java.io.IOException
- if data cannot be read or written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |