Creating New Metaclasses with Stereotypes

You can use stereotypes to create new kinds of objects that behave like standard PowerDesigner metaclasses or to have objects with identical names but different stereotypes in the same namespace (a metaclass stereotype creates a sub-namespace in the current metaclass).

For examples, see Creating New Types of Objects with Stereotypes.

Note: Stereotypes defined on sub-objects (such as table columns or entity attributes), cannot be promoted to metaclass status.
  1. Create a stereotype under the metaclass on which you want to base your new metaclass. If the new object type does not share characteristics with an existing metaclass, then use the ExtendedObject metaclass.
    Note: If the ExtendedObject or other metaclass is not visible, add it by right-clicking the Profile category, and selecting Add Metaclass (see Metaclasses (Profile)).
  2. In the stereotype property page, select Use as metaclass.
  3. [optional] Specify an icon and tool to create instances of the metaclass stereotype.
  4. Click Apply to save the changes and then add extended attributes and other appropriate extensions under the stereotype.
    In your model, the stereotypes has:
    • A separate list in the Model menu after the parent metaclass list (and the parent metaclass list will not display objects with the metaclass stereotype). Objects created in the new list bear the new metaclass stereotype by default. If you change the stereotype, the object will be removed from the list the next time it is opened.
    • A separate Browser folder and command under New, when you right-click the model or a package.
    • Property sheet titles based on the metaclass label.
    • Its own tab in multi-pane selection boxes such as those used for generation.
  5. [optional: DBMS definition files] Add the new object to the Script/Objects and define appropriate SQL statements to enable its generation and reverse-engineering (see Defining Generation and Reverse-Engineering of New Metaclasses).