infoLesson.getInfoShiftList().add(infoShift); infoLessonList.add(infoLesson);
if (infoLesson != null) { infoLesson.getInfoShiftList().add(infoShift); infoLessonList.add(infoLesson); }
    public List run(InfoClass infoClass)    {        ArrayList infoLessonList = null;        try        {            ISuportePersistente sp = SuportePersistenteOJB.getInstance();            ITurnoAulaPersistente shiftLessonDAO = sp.getITurnoAulaPersistente();            ITurmaPersistente persistentDomainClass = sp.getITurmaPersistente();            ITurma group = null;            if (infoClass.getIdInternal() != null)            {                group = new Turma(infoClass.getIdInternal());                group = (ITurma) persistentDomainClass.readByOId(group, false);            }            else            {                group = Cloner.copyInfoClass2Class(infoClass);            }            List shiftList = sp.getITurmaTurnoPersistente().readByClass(group);            Iterator iterator = shiftList.iterator();            infoLessonList = new ArrayList();            while (iterator.hasNext())            {                ITurno shift = (ITurno) iterator.next();                InfoShift infoShift = (InfoShift) Cloner.get(shift);                List lessonList = shiftLessonDAO.readByShift(shift);                Iterator lessonIterator = lessonList.iterator();                while (lessonIterator.hasNext())                {                    IAula elem = (IAula) lessonIterator.next();                    InfoLesson infoLesson = Cloner.copyILesson2InfoLesson(elem);                    infoLesson.getInfoShiftList().add(infoShift);                    infoLessonList.add(infoLesson);                }            }        }        catch (ExcepcaoPersistencia ex)        {            ex.printStackTrace(System.out);        }        return infoLessonList;    }