First page Back Continue Last page Graphics

Traversing Links


Notes:

Traversing Links

Traversing a view link is similar to traversing an association. You use the accessor method in the source (master) view object to get the RowIterator object that contains all the associated rows in the destination (detail) view object. You can also traverse a view link from destination (detail) to source (master).

Similar to the example in the slide, the OrdersViewRowImpl class contains a method to return a single row containing the OrdersView. Using this method, you can determine and manipulate detail information about the Order to which the current OrderItem belongs.

By default, a view link is a one-way relationship that enables the current row of the source (master) to access a set of related rows in the destination (detail) view object. This is accomplished because by default an accessor is generated only in the master view object. On the View Link Properties page of the Create View Link Wizard, you can change the default behavior by generating an accessor in the detail view object.