Getter/setter generation for association between classes

Dear All,

There is a model including two classes: Person and Address.
In Person class, name attribute has setter and getter options checked.

The Java generator generates the following code:

public class Person {
   private String name;
   private Address address;

   public Person() {
   }

   public void setName(String aName) {
      this.name = aName;
   }
   public String getName() {
      return this.name;
   }
}

Is it possible to generate setter and getter methods for address attribute?

Best regards,

Sergio

person002.png

Hello Sergio,

Sure you can do this by specifying the getter/setter property in the specification dialog of the association end (see attached pic)

Best regards,
Rain Wong


Getter_Setter_for_Association_End.png

Rain,

many thanks for your answer!!!
Best regards,

Sergio