Participant()

Creates a new Participant instance.

Syntax

To add a new participant instance to an existing participant in a relationship instance:

Participant(String relDefName,String partDefName, int instanceId,BusObj partData)
 Participant(String relDefName,String partDefName, int instanceId,String partData)
 Participant(String relDefName,String partDefName, int instanceId,long partData)
 Participant(String relDefName,String partDefName, int instanceId,int partData)
 Participant(String relDefName,String partDefName, int instanceId,double partData)
 Participant(String relDefName,String partDefName, int instanceId,float partData)
 Participant(String relDefName,String partDefName, int instanceId,boolean partData)
 

To create a new participant instance with no relationship instance:

Participant(String relDefName,String partDefName, BusObj partData)
 Participant(String relDefName,String partDefName, String partData)
 Participant(String relDefName,String partDefName, long partData)
 Participant(String relDefName,String partDefName, int partData)
 Participant(String relDefName,String partDefName, double partData)
 Participant(String relDefName,String partDefName, float partData)
 Participant(String relDefName,String partDefName, boolean partData)
 

Parameters

relDefName
Name of the relationship definition.
partDefName
Name of the participant definition that describes the participant.
instanceId
The relationship instance ID for the relationship instance to receive the new participant instance.
participantData
Data to associate with the participant instance. Can be one of the following data types: BusObj, String, long, int, double, float, boolean.

Return values

Returns new participant instance.

Exceptions

RelationshipRuntimeException - See "Handling exceptions".

Notes

This method is the Participant class constructor. It takes the following forms:

The data to associate with the participantData parameter depends on the kind of relationship:

Examples

// create a participant instance with no relationship instance ID
 participant p = new Participant(myRelDef,myPartDef,myBusObj);
  
 // create a relationship instance
 int relInstanceId = Relationship.addParticipant(p);
 

See also

addMyChildren(), Creating relationship definitions, "Transforming with a submap"

Copyright IBM Corp. 2003