|
|
|
Berkeley DB version 4.4.20 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sleepycat.bind.serial.SerialSerialBinding
An abstract EntityBinding
that treats an entity's key entry and
data entry as serialized objects.
This class takes care of serializing and deserializing the key and data entry automatically. Its three abstract methods must be implemented by a concrete subclass to convert the deserialized objects to/from an entity object.
Constructor Summary | |
SerialSerialBinding(ClassCatalog classCatalog,
Class keyClass,
Class dataClass)
Creates a serial-serial entity binding. |
|
SerialSerialBinding(SerialBinding keyBinding,
SerialBinding dataBinding)
Creates a serial-serial entity binding. |
Method Summary | |
Object |
entryToObject(DatabaseEntry key,
DatabaseEntry data)
Converts key and data entry buffers into an entity Object. |
abstract Object |
entryToObject(Object keyInput,
Object dataInput)
Constructs an entity object from deserialized key and data objects. |
abstract Object |
objectToData(Object object)
Extracts a data object from an entity object. |
void |
objectToData(Object object,
DatabaseEntry data)
Extracts the data entry from an entity Object. |
abstract Object |
objectToKey(Object object)
Extracts a key object from an entity object. |
void |
objectToKey(Object object,
DatabaseEntry key)
Extracts the key entry from an entity Object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerialSerialBinding(ClassCatalog classCatalog, Class keyClass, Class dataClass)
classCatalog
- is the catalog to hold shared class information and
for a database should be a StoredClassCatalog
.keyClass
- is the key base class.dataClass
- is the data base class.public SerialSerialBinding(SerialBinding keyBinding, SerialBinding dataBinding)
keyBinding
- is the key binding.dataBinding
- is the data binding.Method Detail |
public Object entryToObject(DatabaseEntry key, DatabaseEntry data)
EntityBinding
entryToObject
in interface EntityBinding
key
- is the source key entry.data
- is the source data entry.
public void objectToKey(Object object, DatabaseEntry key)
EntityBinding
objectToKey
in interface EntityBinding
object
- is the source Object.key
- is the destination entry buffer.public void objectToData(Object object, DatabaseEntry data)
EntityBinding
objectToData
in interface EntityBinding
object
- is the source Object.data
- is the destination entry buffer.public abstract Object entryToObject(Object keyInput, Object dataInput)
keyInput
- is the deserialized key object.dataInput
- is the deserialized data object.
public abstract Object objectToKey(Object object)
object
- is the entity object.
public abstract Object objectToData(Object object)
object
- is the entity object.
|
Berkeley DB version 4.4.20 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |