infoShiftEnrollment.setInfoAttendingCourses(readAttendingCourses(sp, student.getNumber()));
infoShiftEnrollment.setInfoAttendingCourses(readAttendingCourses(sp, student.getNumber(), student.getDegreeType()));
    public Object run(Integer studentNumber, Integer executionDegreeIdChosen)            throws FenixServiceException {        InfoShiftEnrollment infoShiftEnrollment = new InfoShiftEnrollment();        ISuportePersistente sp = null;        try {            sp = SuportePersistenteOJB.getInstance();            //read student to enroll            IPersistentStudent persistentStudent = sp.getIPersistentStudent();            IStudent student = persistentStudent.readStudentByNumberAndDegreeType(studentNumber,                    TipoCurso.LICENCIATURA_OBJ);            if (student == null) {                student = persistentStudent.readStudentByNumberAndDegreeType(studentNumber,                        TipoCurso.MESTRADO_OBJ);            }            if (student == null) {                throw new FenixServiceException("errors.impossible.operation");            }            if (student.getPayedTuition() == null || student.getPayedTuition().equals(Boolean.FALSE)) {                throw new FenixServiceException("error.exception.notAuthorized.student.warningTuition");            }            infoShiftEnrollment.setInfoStudent(InfoStudent.newInfoFromDomain(student));            //retrieve all courses that student is currently attended in            infoShiftEnrollment.setInfoAttendingCourses(readAttendingCourses(sp, student.getNumber()));            //retrieve all shifts that student is currently enrollment            //it will be shift associated with all or some attending courses            infoShiftEnrollment.setInfoShiftEnrollment(readShiftEnrollment(sp, student,                    infoShiftEnrollment.getInfoAttendingCourses()));            //calculate the number of courses that have shift enrollment            infoShiftEnrollment.setNumberCourseWithShiftEnrollment(calculeNumberCoursesWithEnrollment(                    infoShiftEnrollment.getInfoAttendingCourses(), infoShiftEnrollment                            .getInfoShiftEnrollment()));            //read current execution period            IPersistentExecutionPeriod persistentExecutionPeriod = sp.getIPersistentExecutionPeriod();            IExecutionPeriod executionPeriod = persistentExecutionPeriod.readActualExecutionPeriod();            if (executionPeriod == null) {                throw new FenixServiceException("errors.impossible.operation");            }            //read current execution year            IExecutionYear executionYear = executionPeriod.getExecutionYear();            if (executionYear == null) {                throw new FenixServiceException("errors.impossible.operation");            }            //retrieve the list of existing degrees            List infoExecutionDegreeList = readInfoExecutionDegrees(sp, executionYear);            infoShiftEnrollment.setInfoExecutionDegreesList(infoExecutionDegreeList);            //select the first execution degree or the execution degree of the            // student logged            InfoExecutionDegree infoExecutionDegree = selectExecutionDegree(sp, infoExecutionDegreeList,                    executionDegreeIdChosen, student);            infoShiftEnrollment.setInfoExecutionDegree(infoExecutionDegree);            //retrieve all courses pertaining to the selected degree            infoShiftEnrollment.setInfoExecutionCoursesList(readInfoExecutionCoursesOfdegree(sp,                    executionPeriod, infoExecutionDegree));        } catch (ExcepcaoPersistencia excepcaoPersistencia) {            throw new FenixServiceException(excepcaoPersistencia);        }        return infoShiftEnrollment;    }