7.4 Link Object Actions


An association class acts as both an ordinary class and an association, so an instance of an association class is both an object and a link. An instance of an association class is called a link object. Because of this dual nature, all operations on link objects affect both the link and the object at once.

Figure 7.9 shows the syntax for several link object actions, and Figure 7.10 shows several examples.

Figure 7.9. Link Object Action Syntax

graphics/07fig09.gif

Figure 7.10. Examples of Link Object Actions

graphics/07fig10.gif

The first statement creates a link object and returns it as the result of the statement.

The second statement selects a single authorship based on the object references for a book and an author.

The last statement unrelates the link and deletes the link object as a single operation.



Executable UML. A Foundation for Model-Driven Architecture
Executable UML: A Foundation for Model-Driven Architecture
ISBN: 0201748045
EAN: 2147483647
Year: 2001
Pages: 161

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net