List executionPeriods = persistentExecutionPeriod.readAllExecutionPeriod();
List executionPeriods = (List)persistentExecutionPeriod.readAll(ExecutionPeriod.class);
    public InfoSiteStudentCourseReport run(Integer objectId) throws FenixServiceException {        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            IPersistentCurricularCourse persistentCurricularCourse = sp.getIPersistentCurricularCourse();            IPersistentStudentCourseReport persistentStudentCourseReport = sp                    .getIPersistentStudentCourseReport();            IPersistentExecutionPeriod persistentExecutionPeriod = sp.getIPersistentExecutionPeriod();            ICurricularCourse curricularCourse = (ICurricularCourse) persistentCurricularCourse                    .readByOID(CurricularCourse.class, objectId);            IStudentCourseReport studentCourseReport = persistentStudentCourseReport                    .readByCurricularCourse(curricularCourse);            List infoScopes = (List) CollectionUtils.collect(curricularCourse.getScopes(),                    new Transformer() {                        public Object transform(Object arg0) {                            ICurricularCourseScope curricularCourseScope = (ICurricularCourseScope) arg0;                            return Cloner                                    .copyICurricularCourseScope2InfoCurricularCourseScope(curricularCourseScope);                        }                    });            InfoStudentCourseReport infoStudentCourseReport = null;            if (studentCourseReport == null) {                infoStudentCourseReport = new InfoStudentCourseReport();                InfoCurricularCourse infoCurricularCourse = Cloner                        .copyCurricularCourse2InfoCurricularCourse(curricularCourse);                infoCurricularCourse.setInfoScopes(infoScopes);                infoStudentCourseReport.setInfoCurricularCourse(infoCurricularCourse);            } else {                infoStudentCourseReport = Cloner                        .copyIStudentCourseReport2InfoStudentCourseReport(studentCourseReport);                InfoCurricularCourse infoCurricularCourse = infoStudentCourseReport                        .getInfoCurricularCourse();                infoCurricularCourse.setInfoScopes(infoScopes);            }            InfoSiteStudentCourseReport infoSiteStudentCourseReport = new InfoSiteStudentCourseReport();            List executionPeriods = persistentExecutionPeriod.readAllExecutionPeriod();            Collections.sort(executionPeriods, new Comparator() {                public int compare(Object o1, Object o2) {                    IExecutionPeriod executionPeriod1 = (IExecutionPeriod) o1;                    IExecutionPeriod executionPeriod2 = (IExecutionPeriod) o2;                    return executionPeriod2.getEndDate().compareTo(executionPeriod1.getEndDate());                }            });            IExecutionPeriod executionPeriod = null;            // read the second element of the list corresponding to the last            // executionPeriod            if ((executionPeriods != null) && (executionPeriods.size() >= 2))                executionPeriod = (IExecutionPeriod) executionPeriods.get(1);            List infoSiteEvaluationHistory = getInfoSiteEvaluationsHistory(                    executionPeriod, curricularCourse, sp);            InfoSiteEvaluationStatistics infoSiteEvaluationStatistics = getInfoSiteEvaluationStatistics(                    executionPeriod, curricularCourse, sp);            infoSiteStudentCourseReport.setInfoStudentCourseReport(infoStudentCourseReport);            infoSiteStudentCourseReport.setInfoSiteEvaluationHistory(infoSiteEvaluationHistory);            infoSiteStudentCourseReport.setInfoSiteEvaluationStatistics(infoSiteEvaluationStatistics);            return infoSiteStudentCourseReport;        } catch (ExcepcaoPersistencia e) {            throw new FenixServiceException(e.getMessage());        }    }