Rational Developer for System z, Version 7.6

Association with the redefines stereotype applied

This topic shows examples of a translated relationship with an association.
The target of such an association generates a COBOL group that redefines the contents of the source of the relationship.
The figure shows stereotyped association with redefines.
Figure 1. Generated COBOL that translates the redefines relationship
01 GRANDCHILD .
   05 PARENT .
      10 ATTR1 PIC X(32).
      10 ATTR2 PIC X(32).
   05 CHILD .
      10 ATTR5 PIC X(32).
      10 ATTR6 PIC X(32).
      10 CONTAINMENT .
         15 ATTRIBUTE1 PIC X(32).
         15 REF  USAGE POINTER.
   05 GRANDCHILD .
      10 ATTR7 PIC X(32).
   05 FLAT redefines GRANDCHILD.
      10 FLAT-ATTR1 PIC X(32).
The figure shows redefining association.
Figure 2. Example redefining parent-child
01 GRANDCHILD .
   05 PARENT .
      10 ATTR1 PIC X(32).
      10 ATTR2 PIC X(32).
   05 REDEF-PARENT redefines PARENT.
      10 ATTRIBUTE1 PIC X(32).
   05 CHILD .
      10 ATTR5 PIC X(32).
      10 ATTR6 PIC X(32).
      10 CONTAINMENT .
         15 ATTRIBUTE1 PIC X(32).
         15 REF  USAGE POINTER.
   05 GRANDCHILD .
      10 ATTR7 PIC X(32).
   05 FLAT redefines GRANDCHILD.
      10 FLAT-ATTR1 PIC X(32).

Combination of these relationships (stereotyped or not) can be used in the class diagram in order to describe the appropriate data structures.

Note: If you want to redefine the whole Data Object and its ancestor you should use the "flatten" strategy for inheritance.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)