Iterator candidateEnrolmentIterator = candidateEnrolments.iterator();  while (candidateEnrolmentIterator.hasNext()) { ICandidateEnrolment candidateEnrolmentTemp = (ICandidateEnrolment) candidateEnrolmentIterator .next(); result .add(Cloner .copyICandidateEnrolment2InfoCandidateEnrolment(candidateEnrolmentTemp)); }  } catch (ExcepcaoPersistencia ex) { FenixServiceException newEx = new FenixServiceException("Persistence layer error"); newEx.fillInStackTrace(); throw newEx;
for (final Iterator candidateEnrolmentIterator = candidateEnrolments.iterator(); candidateEnrolmentIterator .hasNext();) { ICandidateEnrolment candidateEnrolmentTemp = (ICandidateEnrolment) candidateEnrolmentIterator .next(); InfoCandidateEnrolment infoCandidateEnrolment = InfoCandidateEnrolmentWithCurricularCourseAndMasterDegreeCandidateAndExecutionDegreeAndDegreeCurricularPlanAndDegree .newInfoFromDomain(candidateEnrolmentTemp); result.add(infoCandidateEnrolment);
    public List run(Integer candidateID) throws FenixServiceException {        List result = new ArrayList();        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IMasterDegreeCandidate masterDegreeCandidate = (IMasterDegreeCandidate) sp                    .getIPersistentMasterDegreeCandidate().readByOID(MasterDegreeCandidate.class,                            candidateID);            if (masterDegreeCandidate == null) {                throw new NonExistingServiceException();            }            List candidateEnrolments = sp.getIPersistentCandidateEnrolment().readByMDCandidate(                    masterDegreeCandidate);            if (candidateEnrolments == null) {                throw new NonExistingServiceException();            }            Iterator candidateEnrolmentIterator = candidateEnrolments.iterator();            while (candidateEnrolmentIterator.hasNext()) {                ICandidateEnrolment candidateEnrolmentTemp = (ICandidateEnrolment) candidateEnrolmentIterator                        .next();                result                        .add(Cloner                                .copyICandidateEnrolment2InfoCandidateEnrolment(candidateEnrolmentTemp));            }        } catch (ExcepcaoPersistencia ex) {            FenixServiceException newEx = new FenixServiceException("Persistence layer error");            newEx.fillInStackTrace();            throw newEx;        }        return result;    }