com.sleepycat.bind.serial
public abstract class SerialSerialKeyCreator extends Object implements SecondaryKeyCreator
Field Summary | |
---|---|
protected SerialBinding | dataBinding |
protected SerialBinding | indexKeyBinding |
protected SerialBinding | primaryKeyBinding |
Constructor Summary | |
---|---|
SerialSerialKeyCreator(ClassCatalog classCatalog, Class primaryKeyClass, Class dataClass, Class indexKeyClass)
Creates a serial-serial key creator.
| |
SerialSerialKeyCreator(SerialBinding primaryKeyBinding, SerialBinding dataBinding, SerialBinding indexKeyBinding)
Creates a serial-serial entity binding.
|
Method Summary | |
---|---|
boolean | createSecondaryKey(SecondaryDatabase db, DatabaseEntry primaryKeyEntry, DatabaseEntry dataEntry, DatabaseEntry indexKeyEntry) |
abstract Object | createSecondaryKey(Object primaryKey, Object data)
Creates the index key object from primary key and entry objects.
|
boolean | nullifyForeignKey(SecondaryDatabase db, DatabaseEntry dataEntry) |
Object | nullifyForeignKey(Object data)
Clears the index key in a data object.
|
Parameters: classCatalog is the catalog to hold shared class information and for a database should be a StoredClassCatalog. primaryKeyClass is the primary key base class. dataClass is the data base class. indexKeyClass is the index key base class.
Parameters: primaryKeyBinding is the primary key binding. dataBinding is the data binding. indexKeyBinding is the index key binding.
Parameters: primaryKey is the deserialized source primary key entry, or null if no primary key entry is used to construct the index key. data is the deserialized source data entry, or null if no data entry is used to construct the index key.
Returns: the destination index key object, or null to indicate that the key is not present.
On entry the data parameter contains the index key to be cleared. It should be changed by this method such that SerialSerialKeyCreator will return false. Other fields in the data object should remain unchanged.
Parameters: data is the source and destination data object.
Returns: the destination data object, or null to indicate that the key is not present and no change is necessary. The data returned may be the same object passed as the data parameter or a newly created object.