Reputation: 779
I have two domain classes (getter setter of two tables): Contact Information
and Address
.
I have some fields in Contact Information and some fields in Address.
I'm setting the values of the contact information in the controller class but I need to set the values of fields in Address class via Contact Information.
Code:
class ContactInformation {
String id;
String name;
Address address;
//getter and setters
}
And
Class Address{
String idAddress;
...
...
//getter and setter
}
In Controller class
I am setting the values like
contactInformation.setId("some value");
How do i set the value of idAddress via ContactInformation?
Upvotes: 0
Views: 109