Inheritance diagram for collections::ship::factory::Part:
Public Member Functions | |
void | marshalPrimaryKey (TupleOutput keyOutput) |
void | unmarshalPrimaryKey (TupleInput keyInput) |
boolean | marshalSecondaryKey (String keyName, TupleOutput keyOutput) |
boolean | nullifyForeignKey (String keyName) |
In this sample, Part is bound to the stored key/data entry by implementing the MarshalledTupleKeyEntity interface.
The binding is "tricky" in that it uses this class for both the stored data entry and the combined entity object. To do this, the key field(s) are transient and are set by the binding after the data object has been deserialized. This avoids the use of a PartData class completely.
Since this class is used directly for data storage, it must be Serializable.
Definition at line 34 of file Part.java.
|
Extracts the entity's primary key and writes it to the key output.
Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity. Definition at line 88 of file Part.java. References com::sleepycat::bind::tuple::TupleOutput::writeString(). |
|
Extracts the entity's secondary key and writes it to the key output.
Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity. |
|
Clears the entity's secondary key fields for the given key name. The specified index key should be changed by this method such that marshalSecondaryKey for the same key name will return false. Other fields in the data object should remain unchanged.
Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity. |
|
Completes construction of the entity by setting its primary key from the stored primary key.
Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity. |