| com.sleepycat.bind.tuple.MarshalledTupleKeyEntity
All known Subclasses: collections.ship.factory.Shipment, collections.ship.factory.Supplier, collections.ship.factory.Part, com.sleepycat.bind.serial.test.MarshalledObject, com.sleepycat.bind.tuple.test.MarshalledObject,
MarshalledTupleKeyEntity | public interface MarshalledTupleKeyEntity (Code) | | A marshalling interface implemented by entity classes that represent keys as
tuples. Since MarshalledTupleKeyEntity objects are instantiated
using Java deserialization, no particular constructor is required by classes
that implement this interface.
Note that a marshalled tuple key extractor is somewhat less efficient
than a non-marshalled key tuple extractor because more conversions are
needed. A marshalled key extractor must convert the entry to an object in
order to extract the key fields, while an unmarshalled key extractor does
not.
author: Mark Hayes See Also: TupleTupleMarshalledBinding See Also: com.sleepycat.bind.serial.TupleSerialMarshalledBinding |
marshalPrimaryKey | void marshalPrimaryKey(TupleOutput keyOutput)(Code) | | Extracts the entity's primary key and writes it to the key output.
Parameters: keyOutput - is the output tuple. |
marshalSecondaryKey | boolean marshalSecondaryKey(String keyName, TupleOutput keyOutput)(Code) | | Extracts the entity's secondary key and writes it to the key output.
Parameters: keyName - identifies the secondary key. Parameters: keyOutput - is the output tuple. true if a key was created, or false to indicate that the key isnot present. |
nullifyForeignKey | boolean nullifyForeignKey(String keyName)(Code) | | Clears the entity's secondary key fields for the given key name.
The specified index key should be changed by this method such that
MarshalledTupleKeyEntity.marshalSecondaryKey for the same key name will return false.
Other fields in the data object should remain unchanged.
If
com.sleepycat.je.ForeignKeyDeleteAction.NULLIFY was
specified when opening the secondary database, this method is called
when the entity for this foreign key is deleted. If NULLIFY was not
specified, this method will not be called and may always return
false.
Parameters: keyName - identifies the secondary key. true if the key was cleared, or false to indicate that the keyis not present and no change is necessary. |
unmarshalPrimaryKey | void unmarshalPrimaryKey(TupleInput keyInput)(Code) | | Completes construction of the entity by setting its primary key from the
stored primary key.
Parameters: keyInput - is the input tuple. |
|
|