|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.bdb.bind.serial.SerialSerialBinding
public abstract class SerialSerialBinding
An abstract entity binding that uses a serial key and a serial value. This class takes care of serializing and deserializing the key and value data automatically. Its three abstract methods must be implemented by a concrete subclass to convert the deserialized objects to/from an entity object.
| Field Summary | |
|---|---|
protected SerialFormat |
keyFormat
|
protected SerialFormat |
valueFormat
|
| Constructor Summary | |
|---|---|
SerialSerialBinding(SerialFormat keyFormat,
SerialFormat valueFormat)
Creates a serial-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(java.lang.Object keyInput,
java.lang.Object valueInput)
Constructs an entity object from deserialized key and 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. |
abstract java.lang.Object |
objectToKey(java.lang.Object object)
Extracts a key object from an entity object. |
void |
objectToKey(java.lang.Object object,
DataBuffer key)
Extracts the key data 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 SerialFormat keyFormat
protected SerialFormat valueFormat
| Constructor Detail |
|---|
public SerialSerialBinding(SerialFormat 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 EntityBindingkey - 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 EntityBindingobject - 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 EntityBindingobject - is the source Object.value - is the destination data buffer.
java.io.IOExceptionpublic DataFormat getKeyFormat()
EntityBinding
getKeyFormat in interface EntityBindingpublic DataFormat getValueFormat()
EntityBinding
getValueFormat in interface EntityBinding
public abstract java.lang.Object dataToObject(java.lang.Object keyInput,
java.lang.Object valueInput)
throws java.io.IOException
keyInput - is the deserialized key data object.valueInput - is the deserialized value data object.
java.io.IOException
public abstract java.lang.Object objectToKey(java.lang.Object object)
throws java.io.IOException
object - is the entity object.
java.io.IOException
public abstract java.lang.Object objectToValue(java.lang.Object object)
throws java.io.IOException
object - is the entity object.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||