IEnrolment enrolment = (IEnrolment) iterEnrolment.next();
IEnrollment enrolment = (IEnrollment) iterEnrolment.next();
    public Boolean run(Integer curricularCourseCode, String yearString, IUserView userView)        throws FenixServiceException    {        try        {            ISuportePersistente sp = SuportePersistenteOJB.getInstance();            IPersistentCurricularCourse persistentCurricularCourse = sp.getIPersistentCurricularCourse();            IPersistentEnrolmentEvaluation persistentEnrolmentEvaluation =                sp.getIPersistentEnrolmentEvaluation();            IPersistentEnrolment persistentEnrolment = sp.getIPersistentEnrolment();            IPessoaPersistente persistentPerson = sp.getIPessoaPersistente();            //			employee            IPessoa person = persistentPerson.lerPessoaPorUsername(userView.getUtilizador());            IEmployee employee = readEmployee(person);            ICurricularCourse curricularCourse = new CurricularCourse();            curricularCourse.setIdInternal(curricularCourseCode);            curricularCourse =                (ICurricularCourse) persistentCurricularCourse.readByOId(curricularCourse, false);            List enrolments = null;            if (yearString != null)            {            	enrolments =            	persistentEnrolment.readByCurricularCourseAndYear(curricularCourse, yearString);            }            else            {            	enrolments = persistentEnrolment.readByCurricularCourse(curricularCourse);            }            List enrolmentEvaluations = new ArrayList();            Iterator iterEnrolment = enrolments.listIterator();            while (iterEnrolment.hasNext())            {                IEnrolment enrolment = (IEnrolment) iterEnrolment.next();                List allEnrolmentEvaluations =                    persistentEnrolmentEvaluation.readEnrolmentEvaluationByEnrolment(enrolment);                IEnrolmentEvaluation enrolmentEvaluation =                    (IEnrolmentEvaluation) allEnrolmentEvaluations.get(                        allEnrolmentEvaluations.size() - 1);                enrolmentEvaluations.add(enrolmentEvaluation);            }            if (enrolmentEvaluations != null && enrolmentEvaluations.size() > 0)            {                ListIterator iterEnrolmentEvaluations = enrolmentEvaluations.listIterator();                while (iterEnrolmentEvaluations.hasNext())                {                    IEnrolmentEvaluation enrolmentEvaluationElem =                        (IEnrolmentEvaluation) iterEnrolmentEvaluations.next();                    if (enrolmentEvaluationElem.getGrade() != null                        && enrolmentEvaluationElem.getGrade().length() > 0                        && enrolmentEvaluationElem.getEnrolmentEvaluationState().equals(                            EnrolmentEvaluationState.TEMPORARY_OBJ))                    {                        updateEnrolmentEvaluation(                            persistentEnrolmentEvaluation,                            persistentEnrolment,                            employee,                            enrolmentEvaluationElem);                    }                }            }        } catch (ExcepcaoPersistencia ex)        {            ex.printStackTrace();            FenixServiceException newEx = new FenixServiceException("");            newEx.fillInStackTrace();            throw newEx;        }        return Boolean.TRUE;    }