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 SyntaxFigure 7.10. Examples of Link Object ActionsThe 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. |