final Degree degree = degreeCurricularPlan.getDegree(); for (final DegreeCurricularPlan otherDegreeCurricularPlan : degree.getDegreeCurricularPlans()) { for (final ExecutionDegree executionDegree : otherDegreeCurricularPlan.getExecutionDegrees()) { final ExecutionYear executionYear = executionDegree.getExecutionYear(); if (executionYear.getState().equals(PeriodState.CURRENT)) { return InfoExecutionDegree.newInfoFromDomain(executionDegree); } } }
    private InfoExecutionDegree selectExecutionDegree(ISuportePersistente persistentSupport,            List infoExecutionDegreeList, Integer executionDegreeIdChosen, Student student)            throws ExcepcaoPersistencia, FenixServiceException {        final StudentCurricularPlan studentCurricularPlan = student.getActiveStudentCurricularPlan();        if (studentCurricularPlan == null) {            throw new FenixServiceException("errors.impossible.operation");        }        final DegreeCurricularPlan degreeCurricularPlan = studentCurricularPlan.getDegreeCurricularPlan();        for (final ExecutionDegree executionDegree : degreeCurricularPlan.getExecutionDegrees()) {            final ExecutionYear executionYear = executionDegree.getExecutionYear();            if (executionYear.getState().equals(PeriodState.CURRENT)) {                return InfoExecutionDegree.newInfoFromDomain(executionDegree);            }        }        throw new FenixServiceException("errors.impossible.operation");    }