addMyChildren()

Adds the specified child instances to a parent/child relationship for an identity relationship.

Syntax

public static void addMyChildren(String parentChildRelDefName, 
       String parentParticpntDefName, BusObj parentBusObj,
       String childParticpntDefName, Object childBusObjList,
       CxExecutionContext map_ctx)
 

Parameters

parentChildRelDefName
The name of the parent/child relationship definition.

parentParticpntDefName
The name of the participant definition that represents the parent business object in the parent/child relationship.

parentBusObj
The variable that contains the parent business object.

childParticpntDefName
The name of the participant definition that represents the child business object in the parent/child relationship.

childBusObjList
The variable that contains child business object or objects to be added to the relationship. This parameter can be either a single generic business object (BusObj) or an array of generic business objects (BusObjArray).

map_ctx
The map execution context. To pass the map execution context, use the cwExecCtx variable, which Map Designer Express defines for every map.

Return values

None.

Exceptions

RelationshipRuntimeException 
 

Notes

The addMyChildren() method adds the child instances in childBusObjList to the relationship tables of the parentChildRelDefName relationship definition. This method is useful in a custom relationship involving a parent business object with a unique key. When a parent business object has the addition of new child objects, use addMyChildren() to compare the after-image (in parentBusObj) with the before-image (information in the relationship tables) to determine which child objects in the after-image are new. For each new child object, addMyChildren() adds a child instance to the relationship tables for the parent and child participants (parentParticpntDefName and childParticpntDefName, respectively). If the parent business object does not exist in the relationship table, addMyChildren() inserts a relationship instance for this parent object.

The addMyChildren() method requires that a parent/child relationship be defined with Relationship Designer Express. For information on how to create this kind of relationship, see "Creating the parent/child relationship definition"..

See also

deleteMyChildren(), updateMyChildren()

"Managing child instances",.

Copyright IBM Corp. 1997, 2003