if (dto.getApplicant() == null) {
dsp5.setApplicant(null);
} else {
if (dsp5.getApplicant() == null) {
dsp5.setApplicant(new ConcreteBusinessPartner());
}
applyDiffCBP(dsp5.getApplicant(), dto.getApplicant());
}
if (dto.getEndUser() == null) {
dsp5.setEndUser(null);
} else {
if (dsp5.getEndUser() == null) {
dsp5.setEndUser(new ConcreteBusinessPartner());
}
applyDiffCBP(dsp5.getEndUser(), dto.getEndUser());
}
if (dto.getManufacturer() == null) {
dsp5.setManufacturer(null);
} else {
if (dsp5.getManufacturer() == null) {
dsp5.setManufacturer(new ConcreteBusinessPartner());
}
applyDiffCBP(dsp5.getManufacturer(), dto.getManufacturer());
}
if (dto.getSourceOfCommodity() == null) {
dsp5.setSourceOfCommodity(null);
} else {
if (dsp5.getSourceOfCommodity() == null) {
dsp5.setSourceOfCommodity(new ConcreteBusinessPartner());
}
applyDiffCBP(dsp5.getSourceOfCommodity(), dto.getSourceOfCommodity());
}
if (dto.getSeller() == null) {
dsp5.setSeller(null);
} else {
if (dsp5.getSeller() == null) {
dsp5.setSeller(new ConcreteBusinessPartner());
}
applyDiffCBP(dsp5.getSeller(), dto.getSeller());
}
dsp5.getConsignees().clear();
if (dto.getConsignees() != null) {
for (ConcreteBusinessPartnerDTO cbpDto : dto.getConsignees()) {
ConcreteBusinessPartner cbp = null;
if (cbpDto.getId() == null) {
cbp = new ConcreteBusinessPartner();
} else {
cbp = concreteBusinessPartnerDAO.find(cbpDto.getId());
}
applyDiffCBP(cbp, cbpDto);
dsp5.getConsignees().add(cbp);