infoExamsEnrolled.add(infoExam);  if (!isInDate(exam)) {  IExamStudentRoom examStudentRoom = examStudentRoomDAO.readBy(exam, student); InfoExamStudentRoom infoExamStudentRoom = null; if (examStudentRoom != null) { infoExamStudentRoom = Cloner.copyIExamStudentRoom2InfoExamStudentRoom(examStudentRoom); } else { infoExamStudentRoom = new InfoExamStudentRoom(); infoExamStudentRoom.setInfoRoom(null); infoExamStudentRoom.setInfoStudent(null); infoExamStudentRoom.setInfoExam(infoExam); } studentExamDistribution.add(infoExamStudentRoom); }  }
	public Object run(String username) {		List examsToEnroll = new ArrayList();		List infoExamsEnrolled = new ArrayList();		List infoExamsToEnroll = new ArrayList();		List studentExamDistribution = new ArrayList();		try {			ISuportePersistente sp = SuportePersistenteOJB.getInstance();			IPersistentExamStudentRoom examStudentRoomDAO = sp.getIPersistentExamStudentRoom();			IStudent student =				(IStudent) sp.getIPersistentStudent().readByUsername(username);			if (student != null) {				List examsEnrolled = student.getExamsEnrolled();				Iterator examsEnrolledIterator = examsEnrolled.iterator();				while (examsEnrolledIterator.hasNext()) {					IExam exam = (IExam) examsEnrolledIterator.next();					InfoExam infoExam = Cloner.copyIExam2InfoExam(exam);					infoExam.setInfoExecutionCourse(						Cloner.copyIExecutionCourse2InfoExecutionCourse(							(IDisciplinaExecucao) exam								.getAssociatedExecutionCourses()								.get(								0)));					infoExamsEnrolled.add(infoExam);					if (!isInDate(exam)) {						//closedEnrollmentExams.add(infoExam);						IExamStudentRoom examStudentRoom = examStudentRoomDAO.readBy(exam, student);						InfoExamStudentRoom infoExamStudentRoom = null;						if (examStudentRoom != null) {							infoExamStudentRoom = Cloner.copyIExamStudentRoom2InfoExamStudentRoom(examStudentRoom);													} else {							infoExamStudentRoom = new InfoExamStudentRoom();							infoExamStudentRoom.setInfoRoom(null);							infoExamStudentRoom.setInfoStudent(null);							infoExamStudentRoom.setInfoExam(infoExam);						}						studentExamDistribution.add(infoExamStudentRoom);					}				}				List attends =					sp.getIFrequentaPersistente().readByStudentId(						student.getNumber());				Iterator examsToEnrollIterator = attends.iterator();				while (examsToEnrollIterator.hasNext()) {					examsToEnroll.addAll(						((IFrequenta) examsToEnrollIterator.next())							.getDisciplinaExecucao()							.getAssociatedExams());				}				CollectionUtils.filter(					examsToEnroll,					new ExamsNotEnrolledPredicate(examsEnrolled));				Iterator iter3 = examsToEnroll.iterator();				while (iter3.hasNext()) {					IExam exam = (IExam) iter3.next();					if (isInDate(exam)) {						InfoExam infoExam = Cloner.copyIExam2InfoExam(exam);						infoExam.setInfoExecutionCourse(							Cloner.copyIExecutionCourse2InfoExecutionCourse(								(IDisciplinaExecucao) exam									.getAssociatedExecutionCourses()									.get(									0)));						infoExamsToEnroll.add(infoExam);					}				}			}		} catch (ExcepcaoPersistencia e) {			e.printStackTrace();		}		InfoStudentSiteExams component =			new InfoStudentSiteExams(infoExamsToEnroll, infoExamsEnrolled);		component.setStudentDistributions(studentExamDistribution);		SiteView siteView = new SiteView(component);		return siteView;	}