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

collections::ship::factory::Part Class Reference

Inheritance diagram for collections::ship::factory::Part:

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

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.

Author:
Mark Hayes

Definition at line 34 of file Part.java.


Member Function Documentation

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

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

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

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

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


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