retrieveParticipants()

Retrieves zero or more

participants from a relationship instance.

Syntax

Participant[] retrieveParticipants(String relDefName,
        String partDefName, int instanceId)|
  
 Participant[] retrieveParticipants(String relDefName,
        String[] partDefList, int instanceId)
  
 Participant[] retrieveParticipants(String relDefName, 
         int instanceId)
 

Parameters

relDefName
Name of the relationship definition.
partDefName
Name of the participant definition.
partDefList
List of participant definitions.
instanceId
The relationship instance ID of the relationship instance to which the participant belongs.

Return values

Returns an array of Participant instances.

Exceptions

RelationshipRuntimeException 
 

Notes

The retrieveParticipants() method implements a lookup relationship in an outbound map. It obtains the participant instances from the relationship table that are associated with the specified instanceID relationship instance ID. The method retrieves only those attributes that are associated with the relDefName relationship definition. It does not fill in any of the other attributes in the business object. Attributes associated with the relationship definition typically are the key attributes and any others that you explicitly select. See Creating relationship definitions for more information on relationship definitions.

If retrieveParticipants() raises the RelationshipRuntimeException if it receives a null-valued instanceId. If you are not guaranteed that the retrieveInstances() method has returned a matching instance ID, check the value of instanceId for a null value before the call to retrieveParticipants().

The retrieveParticipants() method is a class method declared as static. You can call this method from an existing relationship instance or by referencing the Relationship class.

See also

addMyChildren(), deactivateParticipant(), deleteParticipant(), retrieveInstances()

"Customizing map transformations for a lookup relationship"

Copyright IBM Corp. 2003