com.sleepycat.bind.serial
public abstract class SerialSerialBinding extends Object implements EntityBinding
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) |
abstract Object | entryToObject(Object keyInput, Object dataInput)
Constructs an entity object from deserialized key and data objects.
|
void | objectToData(Object object, DatabaseEntry data) |
abstract Object | objectToData(Object object)
Extracts a data object from an entity object.
|
void | objectToKey(Object object, DatabaseEntry key) |
abstract Object | objectToKey(Object object)
Extracts a key object from an entity object.
|
Parameters: 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.
Parameters: keyBinding is the key binding. dataBinding is the data binding.
Parameters: keyInput is the deserialized key object. dataInput is the deserialized data object.
Returns: the entity object constructed from the key and data.
Parameters: object is the entity object.
Returns: the deserialized data object.
Parameters: object is the entity object.
Returns: the deserialized key object.