Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

collections::ship::factory::Shipment Class Reference

Inheritance diagram for collections::ship::factory::Shipment:

com::sleepycat::bind::tuple::MarshalledTupleKeyEntity

Public Member Functions

void marshalPrimaryKey (TupleOutput keyOutput)
void unmarshalPrimaryKey (TupleInput keyInput)
boolean marshalSecondaryKey (String keyName, TupleOutput keyOutput)
boolean nullifyForeignKey (String keyName)

Detailed Description

A Shipment represents the combined key/data pair for a shipment entity.

In this sample, Shipment 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 ShipmentData class completely.

Since this class is used directly for data storage, it must be Serializable.

Author:
Mark Hayes

Definition at line 34 of file Shipment.java.


Member Function Documentation

void collections::ship::factory::Shipment::marshalPrimaryKey TupleOutput  keyOutput  )  [inline]
 

Extracts the entity's primary key and writes it to the key output.

Parameters:
keyOutput is the output tuple.

Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity.

Definition at line 74 of file Shipment.java.

References com::sleepycat::bind::tuple::TupleOutput::writeString().

boolean collections::ship::factory::Shipment::marshalSecondaryKey String  keyName,
TupleOutput  keyOutput
[inline]
 

Extracts the entity's secondary key and writes it to the key output.

Parameters:
keyName identifies the secondary key.
keyOutput is the output tuple.
Returns:
true if a key was created, or false to indicate that the key is not present.

Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity.

Definition at line 86 of file Shipment.java.

References com::sleepycat::bind::tuple::TupleOutput::writeString().

boolean collections::ship::factory::Shipment::nullifyForeignKey String  keyName  )  [inline]
 

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.

Parameters:
keyName identifies the secondary key.
Returns:
true if the key was cleared, or false to indicate that the key is not present and no change is necessary.

Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity.

Definition at line 99 of file Shipment.java.

void collections::ship::factory::Shipment::unmarshalPrimaryKey TupleInput  keyInput  )  [inline]
 

Completes construction of the entity by setting its primary key from the stored primary key.

Parameters:
keyInput is the input tuple.

Implements com::sleepycat::bind::tuple::MarshalledTupleKeyEntity.

Definition at line 80 of file Shipment.java.


The documentation for this class was generated from the following file:
Generated on Sun Dec 25 12:14:58 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2