Maintains a composite identity relationship from within the parent map.
Syntax
public static void maintainCompositeRelationship(String relDefName, String particpntDefName, BusObj appSpecificBusObj, Object genericBusObjList, CxExecutionContext map_ctx)
Parameters
Return values
None.
Exceptions
RelationshipRuntimeException
Notes
The maintainCompositeRelationship() method maintains the relationship table associated with the particpntDefName participant of the relDefName composite identity relationship. This method maintains a relationship whose participant uses keys from multiple business objects at different levels (a composite key).
This method iterates through all the child business objects in the appSpecificObj parent business object, maintaining the relationship instances in the partDefName participant's relationship table. The method obtains the relationship instance IDs from the array of generic business objects that it receives (genericObjs). For each child instance, maintainCompositeRelationship() calls the maintainSimpleIdentityRelationship() method to perform the actual relationship-table management. The action that maintainSimpleIdentityRelationship() takes depends on the following information:
For more information on the actions that maintainSimpleIdentityRelationship() takes, see "Accessing identity relationship tables". Table 74 through Table 78 provide the actions for each of the calling contexts.
Use maintainCompositeRelationship() in conjunction with the maintainChildVerb() and updateMyChildren() methods to maintain a composite relationship. For more information, see "Customizing map rules for a composite identity relationship".
Examples
// This is an example of a code fragment in a parent map. It maintains // the relationship table for all instances of a child object type for // this application-specific parent object. BusObjArray secondLevel2 = (BusObjArray)ObjFirstLevelBusObj2.get("MultiCardChild"); IdentityRelationship.maintainCompositeRelationship( "CmposRel", "AppSpPrt", ObjFirstLevelBusObj2, secondLevel2, cwExecCtx); IdentityRelationship.updateMyChildren( "PCRel", "Parent", ObjFirstLevelBusObj2, "Child", "MultiCardChild", "CmposRel", "AppSpPrt", cwExecCtx);
For more examples involving maintainCompositeRelationship(), see "Customizing map rules for a composite identity relationship".
See also
updateMyChildren(), maintainChildVerb(), maintainSimpleIdentityRelationship()