IEnrolment enrolment = (IEnrolment) input;
IEnrollment enrolment = (IEnrollment) input;
	public Object run(InfoStudent infoStudent, TipoCurso degreeType, String year)		throws FenixServiceException	{		InfoStudentEnrolmentContext infoStudentEnrolmentContext = null;		try		{			ISuportePersistente sp = SuportePersistenteOJB.getInstance();			IStudentCurricularPlanPersistente studentCurricularPlanDAO = sp.getIStudentCurricularPlanPersistente();			IStudentCurricularPlan studentCurricularPlan = null;			if (infoStudent != null && infoStudent.getNumber() != null)			{				studentCurricularPlan = studentCurricularPlanDAO.readActiveByStudentNumberAndDegreeType(infoStudent.getNumber(),					degreeType);			}			if (studentCurricularPlan == null)			{				throw new FenixServiceException("error.student.curriculum.noCurricularPlans");			}			IPersistentExecutionYear executionYearDAO = sp.getIPersistentExecutionYear();			IExecutionYear executionYear = executionYearDAO.readExecutionYearByName(year);			if (isStudentCurricularPlanFromChosenExecutionYear(studentCurricularPlan, executionYear))			{				IPersistentEnrolment enrolmentDAO = sp.getIPersistentEnrolment();				IPersistentCurricularCourse curricularCourseDAO = sp.getIPersistentCurricularCourse();				List enrollmentsEnrolled = enrolmentDAO					.readEnrolmentsByStudentCurricularPlanAndEnrolmentStateAndCurricularCourseType(studentCurricularPlan,						EnrolmentState.ENROLED, CurricularCourseType.OPTIONAL_COURSE_OBJ);				List enrollments = studentCurricularPlan.getEnrolments();				List coursesFromEnrollments = (List) CollectionUtils.collect(enrollments, new Transformer()				{					public Object transform(Object input)					{						IEnrolment enrolment = (IEnrolment) input;						return enrolment.getCurricularCourse();					}				});				List coursesFromStudentCurricularPlan = curricularCourseDAO.readAllByDegreeCurricularPlanAndType(					studentCurricularPlan.getDegreeCurricularPlan(), CurricularCourseType.OPTIONAL_COURSE_OBJ);				List courses = (List) CollectionUtils.subtract(coursesFromStudentCurricularPlan, coursesFromEnrollments);				infoStudentEnrolmentContext = buildResult(studentCurricularPlan, enrollmentsEnrolled, courses, executionYear);			} else			{				throw new FenixServiceException("error.student.curriculum.not.from.chosen.execution.year");			}		} catch (ExcepcaoPersistencia e)		{			e.printStackTrace();			throw new FenixServiceException(e);		}		return infoStudentEnrolmentContext;	}