infoLesson.getInfoShiftList().add(infoShift); infoLessonList.add(infoLesson); }
final IExecutionCourse executionCourse = shift.getDisciplinaExecucao(); final InfoExecutionCourse infoExecutionCourse = InfoExecutionCourse.newInfoFromDomain(executionCourse); infoShift.setInfoDisciplinaExecucao(infoExecutionCourse);  final IExecutionPeriod executionPeriod = executionCourse.getExecutionPeriod(); final InfoExecutionPeriod infoExecutionPeriod2 = InfoExecutionPeriod.newInfoFromDomain(executionPeriod); infoExecutionCourse.setInfoExecutionPeriod(infoExecutionPeriod2);  final Collection lessons = shift.getAssociatedLessons(); final List infoLessons = new ArrayList(lessons.size()); infoShift.setInfoLessons(infoLessons); for (final Iterator iterator2 = lessons.iterator(); iterator2.hasNext(); ) { final ILesson lesson = (ILesson) iterator2.next(); final InfoLesson infoLesson = InfoLesson.newInfoFromDomain(lesson); infoLesson.setInfoShift(infoShift); infoLesson.setInfoShiftList(new ArrayList(1)); infoLesson.getInfoShiftList().add(infoShift);  final IRoomOccupation roomOccupation = lesson.getRoomOccupation(); final InfoRoomOccupation infoRoomOccupation = InfoRoomOccupation.newInfoFromDomain(roomOccupation); infoLesson.setInfoRoomOccupation(infoRoomOccupation);  final IRoom room = roomOccupation.getRoom(); final InfoRoom infoRoom = InfoRoom.newInfoFromDomain(room); infoRoomOccupation.setInfoRoom(infoRoom); infoLesson.setInfoSala(infoRoom);  final IPeriod period = roomOccupation.getPeriod(); final InfoPeriod infoPeriod = InfoPeriod.newInfoFromDomain(period); infoRoomOccupation.setInfoPeriod(infoPeriod);  infoLessons.add(infoLesson); infoLessonList.add(infoLesson);
    public List run(List infoExecutionDegrees, InfoExecutionPeriod infoExecutionPeriod) {        List infoViewClassScheduleList = new ArrayList();        try {            ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();            ITurmaPersistente classDAO = sp.getITurmaPersistente();            //ITurnoAulaPersistente shiftLessonDAO =            // sp.getITurnoAulaPersistente();            // Read executionDegrees classes            List classes = new ArrayList();            for (int i = 0; i < infoExecutionDegrees.size(); i++) {                InfoExecutionDegree infoExecutionDegree = (InfoExecutionDegree) infoExecutionDegrees                        .get(i);                IExecutionDegree executionDegree = (IExecutionDegree) classDAO.readByOID(                        ExecutionDegree.class, infoExecutionDegree.getIdInternal());                List degreeClasses = classDAO.readByExecutionDegree(executionDegree);                for (Iterator iterator = degreeClasses.iterator(); iterator.hasNext(); ) {                    ISchoolClass klass = (ISchoolClass) iterator.next();                    if (klass.getExecutionPeriod().getIdInternal().equals(infoExecutionPeriod.getIdInternal())) {                        classes.add(klass);                    }                }                //CollectionUtils.addAll(classes, iterator);            }            for (int i = 0; i < classes.size(); i++) {                InfoViewClassSchedule infoViewClassSchedule = new InfoViewClassSchedule();                ISchoolClass turma = (ISchoolClass) classes.get(i);                // read class lessons                List shiftList = sp.getITurmaTurnoPersistente().readByClass(turma);                Iterator iterator = shiftList.iterator();                List infoLessonList = new ArrayList();                while (iterator.hasNext()) {                    IShift shift = (IShift) iterator.next();                    InfoShift infoShift = (InfoShift) Cloner.get(shift);                    List lessonList = shift.getAssociatedLessons();                    //List lessonList = shiftLessonDAO.readByShift(shift);                    Iterator lessonIterator = lessonList.iterator();                    while (lessonIterator.hasNext()) {                        ILesson elem = (ILesson) lessonIterator.next();                        InfoLesson infoLesson = Cloner.copyILesson2InfoLesson(elem);                        if (infoLesson != null) {                            infoLesson.setInfoShift(infoShift);                            infoLesson.getInfoShiftList().add(infoShift);                            infoLessonList.add(infoLesson);                        }                    }                }                infoViewClassSchedule.setInfoClass(InfoClass.newInfoFromDomain(turma));                infoViewClassSchedule.setClassLessons(infoLessonList);                infoViewClassScheduleList.add(infoViewClassSchedule);            }        } catch (ExcepcaoPersistencia ex) {            ex.printStackTrace();        }        return infoViewClassScheduleList;    }