27.7. Qualified Associations

A qualifier may be used in an association; it distinguishes the set of objects at the far end of the association based on the qualifier value. An association with a qualifier is a qualified association.

For example, ProductSpecifications may be distinguished in a ProductCatalog by their itemID, as illustrated in Figure 27.14 (b). As contrasted in Figure 27.14 (a) vs. (b), qualification reduces the multiplicity at the far end from the qualifier, usually down from many to one. Depicting a qualifier in a domain model communicates how, in the domain, things of one class are distinguished in relation to another class. They should not, in the domain model, be used to express design decisions about lookup keys, although that is suitable in other diagrams illustrating design decisions.

Figure 27.14. Qualified association.


Qualifiers do not usually add compelling useful new information, and we can fall into the trap of “design-think.” However, used judiciously, they can sharpen understanding about the domain. The qualified associations between ProductCatalog and ProductSpecification provide a reasonable example of a value-added qualifier.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.253.149