Adding a Reference Property

Use the Add Reference command from the Properties menu to add a new static reference to the selected class. You can add a reference to the selected class at any time. (For details about adding a dynamic reference, see "Defining a Dynamic Reference Property" under "Dynamic Clusters and Properties".)

A reference is a property that contains a reference to another object; that is, it is an end point in a one- or two-directional relationship. The two types of reference are:

The advantage of using an inverse relationship instead of an implicit relationship is that one side of an inverse relationship can be maintained automatically by JADE.

For details about using condition constraints to maintain automatic inverse references when the specified conditions are satisfied, see "Defining and Compiling JADE Methods and Conditions" and "Adding Conditions to Classes or Primitive Types", earlier in this chapter.

To add a reference property

  1. In the Class Browser, select the class to which the reference is to be added.

  2. Select the Add Reference command from the Properties menu.

The Define Reference dialog, shown in the following image in an example of its initial form, is then displayed.

An extended form of the dialog is displayed when you specify that you want to define an inverse reference. For details, see "Defining an Inverse Reference Property", later in this chapter.