try { ISuportePersistente sp = SuportePersistenteOJB.getInstance();  ITurmaTurnoPersistente classShiftDAO = sp.getITurmaTurnoPersistente();  IExecutionPeriod executionPeriod = Cloner.copyInfoExecutionPeriod2IExecutionPeriod(infoExecutionPeriod); ICursoExecucao executionDegree = Cloner.copyInfoExecutionDegree2ExecutionDegree(infoExecutionDegree);  ITurma group = new Turma();  group.setExecutionDegree(executionDegree); group.setExecutionPeriod(executionPeriod); group.setNome(className);  List shiftList = classShiftDAO.readByClass(group);    Iterator iterator = shiftList.iterator(); infoTurnos = new ArrayList(); while(iterator.hasNext()) { ITurno elem = (ITurno)iterator.next(); infoTurnos.add(Cloner.copyIShift2InfoShift(elem)); } } catch (ExcepcaoPersistencia ex) { ex.printStackTrace(); }  return infoTurnos; }
try { ISuportePersistente sp = SuportePersistenteOJB.getInstance();  ITurmaTurnoPersistente classShiftDAO = sp.getITurmaTurnoPersistente();  IExecutionPeriod executionPeriod = Cloner.copyInfoExecutionPeriod2IExecutionPeriod(infoExecutionPeriod); ICursoExecucao executionDegree = Cloner.copyInfoExecutionDegree2ExecutionDegree(infoExecutionDegree);  ITurma group = new Turma();  group.setExecutionDegree(executionDegree); group.setExecutionPeriod(executionPeriod); group.setNome(className);  List shiftList = classShiftDAO.readByClass(group);  Iterator iterator = shiftList.iterator(); infoTurnos = new ArrayList();  while (iterator.hasNext()) { ITurno turno = (ITurno) iterator.next(); InfoShift infoTurno = Cloner.copyIShift2InfoShift(turno);  List aulas = turno.getAssociatedLessons(); Iterator itLessons = aulas.iterator();  List infoLessons = new ArrayList(); InfoLesson infoLesson;  while(itLessons.hasNext()){ infoLesson = Cloner.copyILesson2InfoLesson((IAula) itLessons.next()); infoLessons.add(infoLesson); }  infoTurno.setInfoLessons(infoLessons); infoShiftAndLessons.add(infoTurno);  } } catch (ExcepcaoPersistencia ex) { throw new FenixServiceException(ex); } return infoShiftAndLessons;  }
  public Object run(String className, InfoExecutionDegree infoExecutionDegree, InfoExecutionPeriod infoExecutionPeriod) {    ArrayList infoTurnos = null;    try {		ISuportePersistente sp = SuportePersistenteOJB.getInstance();            	ITurmaTurnoPersistente classShiftDAO = sp.getITurmaTurnoPersistente();              IExecutionPeriod executionPeriod = Cloner.copyInfoExecutionPeriod2IExecutionPeriod(infoExecutionPeriod);      ICursoExecucao executionDegree = Cloner.copyInfoExecutionDegree2ExecutionDegree(infoExecutionDegree);            ITurma group = new Turma();      	  group.setExecutionDegree(executionDegree);      group.setExecutionPeriod(executionPeriod);      group.setNome(className);            List shiftList = classShiftDAO.readByClass(group);                        Iterator iterator = shiftList.iterator();      infoTurnos = new ArrayList();      while(iterator.hasNext()) {      	ITurno elem = (ITurno)iterator.next();        infoTurnos.add(Cloner.copyIShift2InfoShift(elem));      }    } catch (ExcepcaoPersistencia ex) {      ex.printStackTrace();    }        return infoTurnos;  }