target.setPersonTo(null);
} else { // source.getPersonTo() != null ) {
/* Add a new associated object */
if (source.getPersonTo().getId() != null) {
/* Add an existing object */
Person original = personDao.retrieve(source.getPersonTo()
.getId());
Person updated = personDtoTranslator.fromDto(source
.getPersonTo(), original, translated);
target.setPersonTo(updated);
} else {
/* Add a new object */
target.setPersonTo(personDtoTranslator.fromDto(source
.getPersonTo(), translated));
}
}
/*
* Synchronize PersonFrom association.
*/
if (source.getPersonFrom() == null) {
/* Delete associated object */
target.setPersonFrom(null);
} else { // source.getPersonFrom() != null ) {
/* Add a new associated object */
if (source.getPersonFrom().getId() != null) {
/* Add an existing object */
Person original = personDao.retrieve(source.getPersonFrom()
.getId());
Person updated = personDtoTranslator.fromDto(source
.getPersonFrom(), original, translated);
target.setPersonFrom(updated);
} else {
/* Add a new object */
target.setPersonFrom(personDtoTranslator.fromDto(source