| java.lang.Object com.sleepycat.bind.serial.SerialSerialKeyCreator
SerialSerialKeyCreator | abstract public class SerialSerialKeyCreator implements SecondaryKeyCreator,ForeignKeyNullifier(Code) | | A abstract key creator that uses a serial key and a serial data entry.
This class takes care of serializing and deserializing the key and data
entry automatically.
The following abstract method must be implemented by a concrete subclass
to create the index key using these objects
If
com.sleepycat.je.ForeignKeyDeleteAction.NULLIFY was
specified when opening the secondary database, the following method must be
overridden to nullify the foreign index key. If NULLIFY was not specified,
this method need not be overridden.
author: Mark Hayes |
SerialSerialKeyCreator | public SerialSerialKeyCreator(ClassCatalog classCatalog, Class primaryKeyClass, Class dataClass, Class indexKeyClass)(Code) | | Creates a serial-serial key creator.
Parameters: classCatalog - is the catalog to hold shared class information andfor a database should be a StoredClassCatalog. Parameters: primaryKeyClass - is the primary key base class. Parameters: dataClass - is the data base class. Parameters: indexKeyClass - is the index key base class. |
SerialSerialKeyCreator | public SerialSerialKeyCreator(SerialBinding primaryKeyBinding, SerialBinding dataBinding, SerialBinding indexKeyBinding)(Code) | | Creates a serial-serial entity binding.
Parameters: primaryKeyBinding - is the primary key binding. Parameters: dataBinding - is the data binding. Parameters: indexKeyBinding - is the index key binding. |
createSecondaryKey | abstract public Object createSecondaryKey(Object primaryKey, Object data)(Code) | | Creates the index key object from primary key and entry objects.
Parameters: primaryKey - is the deserialized source primary key entry, ornull if no primary key entry is used to construct the index key. Parameters: data - is the deserialized source data entry, or null if nodata entry is used to construct the index key. the destination index key object, or null to indicate thatthe key is not present. |
nullifyForeignKey | public Object nullifyForeignKey(Object data)(Code) | | Clears the index key in a data object.
On entry the data parameter contains the index key to be cleared. It
should be changed by this method such that
SerialSerialKeyCreator.createSecondaryKey will return false. Other fields in the data object should remain
unchanged.
Parameters: data - is the source and destination data object. the destination data object, or null to indicate that thekey is not present and no change is necessary. The data returned maybe the same object passed as the data parameter or a newly createdobject. |
|
|