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

collections::ship::factory::Supplier Class Reference

Inheritance diagram for collections::ship::factory::Supplier:

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 Supplier represents the combined key/data pair for a supplier entity.

In this sample, Supplier 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 SupplierData class completely.

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

Author:
Mark Hayes

Definition at line 34 of file Supplier.java.


Member Function Documentation

void collections::ship::factory::Supplier::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 81 of file Supplier.java.

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

boolean collections::ship::factory::Supplier::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 91 of file Supplier.java.

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

boolean collections::ship::factory::Supplier::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 105 of file Supplier.java.

void collections::ship::factory::Supplier::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 86 of file Supplier.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