public CompanyPositionDTO update(AuthenticationDTO auth, CompanyPositionDTO dto) throws ApplicationException { authenticate(auth); CompanyPosition entity = session.get(dto.getId()); if (entity == null) throwException(2); entity = session.add(CompanyPositionUtil.update(entity, dto)); return CompanyPositionUtil.copy(entity); }
public CompanyPositionDTO get(AuthenticationDTO auth, Integer id) throws ApplicationException { authenticate(auth); CompanyPosition entity = session.get(id); return CompanyPositionUtil.copy(entity); }