| java.lang.Object com.sleepycat.bind.tuple.TupleBase com.sleepycat.bind.serial.TupleSerialKeyCreator
All known Subclasses: com.sleepycat.bind.serial.TupleSerialMarshalledKeyCreator,
TupleSerialKeyCreator | abstract public class TupleSerialKeyCreator extends TupleBase implements SecondaryKeyCreator,ForeignKeyNullifier(Code) | | A abstract key creator that uses a tuple key and a serial data entry. This
class takes care of serializing and deserializing the data entry, and
converting the key entry to/from
TupleInput and
TupleOutput objects.
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 |
TupleSerialKeyCreator | public TupleSerialKeyCreator(ClassCatalog classCatalog, Class dataClass)(Code) | | Creates a tuple-serial key creator.
Parameters: classCatalog - is the catalog to hold shared class information andfor a database should be a StoredClassCatalog. Parameters: dataClass - is the data base class. |
TupleSerialKeyCreator | public TupleSerialKeyCreator(SerialBinding dataBinding)(Code) | | Creates a tuple-serial key creator.
Parameters: dataBinding - is the data binding. |
createSecondaryKey | abstract public boolean createSecondaryKey(TupleInput primaryKeyInput, Object dataInput, TupleOutput indexKeyOutput)(Code) | | Creates the index key entry from primary key tuple entry and
deserialized data entry.
Parameters: primaryKeyInput - is the TupleInput for the primary keyentry, or null if no primary key entry is used to construct the indexkey. Parameters: dataInput - is the deserialized data entry, or null if no dataentry is used to construct the index key. Parameters: indexKeyOutput - is the destination index key tuple. For indexkeys which are optionally present, no tuple entry should be output toindicate that the key is not present or null. true if a key was created, or false to indicate that the key isnot present. |
nullifyForeignKey | public Object nullifyForeignKey(Object data)(Code) | | Clears the index key in the deserialized data entry.
On entry the data parameter contains the index key to be cleared. It
should be changed by this method such that
TupleSerialKeyCreator.createSecondaryKey will return false. Other fields in the data object should remain
unchanged.
Parameters: data - is the source and destination deserialized dataentry. 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. |
|
|