Chapter 10 PowerDesigner Public Metamodel


Associations and collections

Associations are used to express the semantic connections between classes called collections. In the association property sheet, the roles carry information about the end object of the association. In the PowerDesigner metamodel, this role has the same name as a collection for the current object. PowerDesigner objects are linked to other objects using collections.

Usually associations have only one role, the role is at the opposite of the class for which it represents a collection. In the following example, Identifier has a collection called Attributes:


When associations have two roles, both collections cannot be saved in the XML file, only the collection with the navigable role will be saved.

For more information on navigable roles, see section XML and the PowerDesigner metamodel in chapter PowerDesigner File Format Specification.

Composition

Among associations, the compositions express a strong ownership of child classes by the parent class; the children live and die with the parent. When the parent is copied, the child is also copied.

For example, in package PdCommon, diagram Option Lists, class NamingConvention is associated with class BaseModelOptions with 3 composition associations: NameNamingConventions, CodeNamingConventions, and NamingConventionsTemplate. These composition associations express the fact that class NamingConvention would not exist without class BaseModelOptions.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.