public CreditApplication save(FinalAssessmentDTO data) throws ServiceException { unMask(data); data.unmaskFAFields(); // saved changed quote data first super.save(data); // now save the new DC1 data entity = capDAO.read(data.getId()); entity.fromDTO(data); // associate applicant data entity = applicantDAO.associate(entity, data); // and save entity.setUpdatedBy(data.getUserLink().getUserName()); entity.setUpdatedOn(DateUtils.now()); entity = capDAO.save(entity); // update the bankaccount too updateMainBankAccount(data); // let descendants implement their own note saves if (!this.getClass().getSimpleName().equals(DAO)) return entity; Long pid = entity.getPid(); // save exceptions saveExceptions(data.getErrors(), pid, data.getTid(), TASK); // save notes saveNotes(data.getNotes(), pid, data.getTid(), TASK); return entity; }