throws FenixServiceException, ExcepcaoPersistencia { final DegreeCurricularPlan degreeCurricularPlan = rootDomainObject.readDegreeCurricularPlanByOID(degreeCurricularPlanID); final ExecutionYear executionYear = rootDomainObject.readExecutionYearByOID(executioYearID); final SortedSet<DegreeModuleScope> degreeModuleScopes = degreeCurricularPlan.getDegreeModuleScopes(); for (final Iterator<DegreeModuleScope> degreeModuleScopeIterator = degreeModuleScopes.iterator(); degreeModuleScopeIterator.hasNext(); ) { final DegreeModuleScope degreeModuleScope = degreeModuleScopeIterator.next(); if (!degreeModuleScope.isActiveForExecutionYear(executionYear)) { degreeModuleScopeIterator.remove(); } } return degreeModuleScopes;
throws FenixServiceException, ExcepcaoPersistencia { final DegreeCurricularPlan degreeCurricularPlan = rootDomainObject .readDegreeCurricularPlanByOID(degreeCurricularPlanID); final ExecutionYear executionYear = rootDomainObject.readExecutionYearByOID(executioYearID);  final ComparatorChain comparator = new ComparatorChain(); comparator.addComparator(new BeanComparator("curricularYear")); comparator.addComparator(new BeanComparator("curricularSemester")); comparator.addComparator(new BeanComparator("curricularCourse.idInternal")); comparator.addComparator(new BeanComparator("branch"));  final SortedSet<DegreeModuleScope> scopes = new TreeSet<DegreeModuleScope>(comparator);  for (DegreeModuleScope degreeModuleScope : degreeCurricularPlan.getDegreeModuleScopes()) { if (degreeModuleScope.isActiveForExecutionYear(executionYear)) { scopes.add(degreeModuleScope); } }  return scopes;
    public SortedSet<DegreeModuleScope> run(Integer degreeCurricularPlanID, Integer executioYearID)            throws FenixServiceException, ExcepcaoPersistencia {        final DegreeCurricularPlan degreeCurricularPlan = rootDomainObject.readDegreeCurricularPlanByOID(degreeCurricularPlanID);        final ExecutionYear executionYear = rootDomainObject.readExecutionYearByOID(executioYearID);        final SortedSet<DegreeModuleScope> degreeModuleScopes = degreeCurricularPlan.getDegreeModuleScopes();        for (final Iterator<DegreeModuleScope> degreeModuleScopeIterator = degreeModuleScopes.iterator();                degreeModuleScopeIterator.hasNext(); ) {            final DegreeModuleScope degreeModuleScope = degreeModuleScopeIterator.next();            if (!degreeModuleScope.isActiveForExecutionYear(executionYear)) {                degreeModuleScopeIterator.remove();            }        }        return degreeModuleScopes;    }