Example #1
0
 @Override
 protected StaffPersonal saveWithChildObjects(
     StaffPersonal hitsObject, RequestDTO<StaffPersonalType> dto, String zoneId, boolean create) {
   StaffPersonal result = null;
   Set<StaffPersonalOtherId> otherIds = new HashSet<StaffPersonalOtherId>();
   otherIds.addAll(hitsObject.getOtherIds());
   hitsObject.getOtherIds().clear();
   result = super.saveWithChildObjects(hitsObject, dto, zoneId, create);
   for (StaffPersonalOtherId otherId : otherIds) {
     otherId.setStaffPersonal(hitsObject);
     staffPersonalOtherIdDAO.save(otherId);
   }
   result.setOtherIds(otherIds);
   return result;
 }
Example #2
0
 @Override
 protected boolean hasChildObjects(StaffPersonal hitsObject) {
   return hitsObject != null
       && hitsObject.getOtherIds() != null
       && !hitsObject.getOtherIds().isEmpty();
 }