IEnrolment enrolment = attend.getEnrolment();
IEnrollment enrolment = attend.getEnrolment();
    public InfoSiteSubmitMarks run(        Integer executionCourseCode,        Integer evaluationCode,        UserView userView)        throws FenixServiceException    {        try        {            ISuportePersistente sp = SuportePersistenteOJB.getInstance();            //execution course and execution course's site            IPersistentExecutionCourse persistentExecutionCourse = sp.getIPersistentExecutionCourse();			IPersistentEnrolmentEvaluation enrolmentEvaluationDAO = sp.getIPersistentEnrolmentEvaluation();            IExecutionCourse executionCourse = new ExecutionCourse();            executionCourse.setIdInternal(executionCourseCode);            executionCourse =                (IExecutionCourse)persistentExecutionCourse.readByOId(executionCourse, false);            //evaluation            IPersistentEvaluation persistentEvaluation = sp.getIPersistentEvaluation();            IEvaluation evaluation = new Evaluation();            evaluation.setIdInternal(evaluationCode);            evaluation = (IEvaluation)persistentEvaluation.readByOId(evaluation, false);            //attend list            IFrequentaPersistente persistentAttend = sp.getIFrequentaPersistente();            List attendList = persistentAttend.readByExecutionCourse(executionCourse);            //verifySubmitMarks(attendList);            			List enrolmentListIds = (List)CollectionUtils.collect(attendList, new Transformer()			{				public Object transform(Object input)				{					IFrequenta attend = (IFrequenta)input;					IEnrolment enrolment = attend.getEnrolment();					return enrolment == null ? null : enrolment.getIdInternal();				}			});			enrolmentListIds = (List)CollectionUtils.select(enrolmentListIds, new Predicate()			{				public boolean evaluate(Object arg0)				{					return arg0 != null;				}			});			List alreadySubmiteMarks = enrolmentEvaluationDAO.readAlreadySubmitedMarks(enrolmentListIds);            			if(!alreadySubmiteMarks.isEmpty())			{				throw new FenixServiceException("errors.submitMarks.yetSubmited");			}            InfoSiteSubmitMarks infoSiteSubmitMarks = new InfoSiteSubmitMarks();            			infoSiteSubmitMarks.setInfoEvaluation(Cloner.copyIEvaluation2InfoEvaluation(evaluation));						return infoSiteSubmitMarks;        }        catch (Exception e)        {            e.printStackTrace();            throw new FenixServiceException(e.getMessage());        }    }