for (ExecutionPeriod executionPeriod : executionYear.getExecutionPeriods()) { for (CurricularCourse course : curricularCourses) { executionCourses.addAll(course.getExecutionCoursesByExecutionPeriod(executionPeriod)); }
for (CurricularCourse course : curricularCourses) { executionCourses.addAll(course.getExecutionCoursesByExecutionPeriod(executionPeriod));
    public List<ExecutionCourseStatisticsDTO> run(Integer competenceCourseId, Integer degreeId,            Integer executionYearId) throws FenixServiceException, ExcepcaoPersistencia {        CompetenceCourse competenceCourse = rootDomainObject.readCompetenceCourseByOID(competenceCourseId);        Degree degree = rootDomainObject.readDegreeByOID(degreeId);        ExecutionYear executionYear = rootDomainObject.readExecutionYearByOID(executionYearId);        List<CurricularCourse> curricularCourses = competenceCourse                .getAssociatedCurricularCoursesGroupedByDegree().get(degree);        List<ExecutionCourse> executionCourses = new ArrayList<ExecutionCourse>();        for (ExecutionPeriod executionPeriod : executionYear.getExecutionPeriods()) {            for (CurricularCourse course : curricularCourses) {                executionCourses.addAll(course.getExecutionCoursesByExecutionPeriod(executionPeriod));            }        }        List<ExecutionCourseStatisticsDTO> results = new ArrayList<ExecutionCourseStatisticsDTO>();        for (ExecutionCourse executionCourse : executionCourses) {            ExecutionCourseStatisticsDTO executionCourseStatistics = new ExecutionCourseStatisticsDTO();            executionCourseStatistics.setIdInternal(competenceCourse.getIdInternal());            executionCourseStatistics.setName(competenceCourse.getName());            executionCourseStatistics.setExecutionPeriod(executionCourse.getExecutionPeriod().getName());            executionCourseStatistics.setTeacher(getResponsibleTeacherName(executionCourse));            executionCourseStatistics.setExecutionYear(executionCourse.getExecutionPeriod()                    .getExecutionYear().getYear());            executionCourseStatistics.setDegrees(getDegrees(executionCourse));            createCourseStatistics(executionCourseStatistics, executionCourse                    .getActiveEnrollmentEvaluations());            results.add(executionCourseStatistics);        }        return results;    }