Non-primitive class

 

Overview

Objecteering is used to provide a semantic nuance between primitive classes, usually intended to be used as a type for attributes, and non-primitive classes, generally used as association destinations.

 

In the first phase of modeling, this is a distinction which we need not pay attention to.

 

The present pattern is used in a unique command to transform a primitive class into a non-primitive class, and parallel to this, to transform attributes with this type into associations.

 

 

Prerequisites

This pattern is applied to every primitive model class.

 

 

Applying the pattern

The model before transformation is as follows:

 

Figure 157. The model before transformation

 

 

Calling the pattern

 

Figure 158. Calling the pattern

 

 

Consequence of applying the pattern

The model after transformation is as follows:

 

Figure 159. The model after transformation

 

 

Summary of modifications made to the model

The class to which the pattern is applied is transformed into a non-primitive class.  Parallel to this, attributes which have this class as type are transformed into navigable associations directed towards this class.

 

The navigable link takes as its role name the same name as the attribute, as well as taking the same visibility as the attribute.  Its minimum multiplicity is set to 0, with the maximum multiplicity being the size of the attribute.  Tagged values and notes are carried over, inasmuch as their types exist on two types of object.  Stereotypes are carried over inasmuch as they exist on two types of object.