Exposing Association Accessors

While creating an association with the Association Wizard or editing an association with the Association Editor, in the Association Properties page, you can generate and name association accessors, which return data from the other side of the association. For example, inside the Dept entity object, you could call getEmps() and get back a collection of Employee entity objects that reflected the employees working in the current department.

The accessors are placed in the entity object class.

Field

Description

Expose accessor

Select this option to expose the accessor method in the source or destination entity object. By default, associations are exposed in the owning entity objects through association accessors. These accessors are a special kind of attribute that returns the data from the other side of an association.

Accessor

Type the name of the accessor method or accept the default name provided. The accessor method will be available to the entity object on the other side of the association. For example, in a Dept-Emp association, Dept would have an accessor called getEmp().

To generate an association accessor:

  1. For the source or destination entity object, select Expose accessor.

  2. Optionally change the name of the accessor method.

To not generate an association accessor: