Assume I have the following objects:
class Person {
String firstName;
String lastName;
}
class PersonBLO {
Person person;
Integer foo; // Some calculated business property
}
class PersonDTO {
String firstName;
String lastName;
Integer foo;
}
I find myself writing the following mapper:
@Mapping(target = "firstName", source = "person.firstName")
@Mapping(target = "lastName", source = "person.lastName")
PersonDTO personBLOToPersonDTO(PersonBLO personBLO);
Is it possible to automagically map all person.*
attributes to the corresponding *
attributes?