try { executionCourse = (InfoExecutionCourse) Cloner.get(site.getExecutionCourse()); } catch (ExcepcaoPersistencia e) { throw new FenixServiceException(e); }
executionCourse = (InfoExecutionCourse) Cloner.get(site.getExecutionCourse());
    private InfoSiteCurricularCoursesAndAssociatedShiftsAndClasses getInfoSiteCurricularCoursesAndAssociatedShiftsAndClasses(        InfoSiteCurricularCoursesAndAssociatedShiftsAndClasses component,        ISite site)        throws FenixServiceException    {        ISuportePersistente sp;        List infoShiftsWithAssociatedClassesList = new ArrayList();        List infoCurricularCourseList = new ArrayList();        List shifts = new ArrayList();        InfoShiftWithAssociatedInfoClassesAndInfoLessons shiftWithAssociatedClassesAndLessons = null;        try        {            sp = SuportePersistenteOJB.getInstance();            // read degrees            IExecutionCourse executionCourse = site.getExecutionCourse();            infoCurricularCourseList = readCurricularCourses(executionCourse);            // read shifts and classes            shifts = sp.getITurnoPersistente().readByExecutionCourse(executionCourse);            if (shifts == null || shifts.isEmpty())            {            }            else            {                for (int i = 0; i < shifts.size(); i++)                {                    ITurno shift = (ITurno) shifts.get(i);                    shiftWithAssociatedClassesAndLessons =                        new InfoShiftWithAssociatedInfoClassesAndInfoLessons(                            Cloner.copyShift2InfoShift(shift),                            null,                            null);                    List classesShifts = sp.getITurmaTurnoPersistente().readClassesWithShift(shift);                    List infoClasses = new ArrayList();                    for (int j = 0; j < classesShifts.size(); j++)                        infoClasses.add(                            Cloner.copyClass2InfoClass(((ITurmaTurno) classesShifts.get(j)).getTurma()));                    shiftWithAssociatedClassesAndLessons.setInfoClasses(infoClasses);                    infoShiftsWithAssociatedClassesList.add(shiftWithAssociatedClassesAndLessons);                }            }        }        catch (ExcepcaoPersistencia excepcaoPersistencia)        {            throw new FenixServiceException(excepcaoPersistencia);        }        component.setAssociatedCurricularCourses(infoCurricularCourseList);        InfoExecutionCourse executionCourse;		try		{			executionCourse = (InfoExecutionCourse) Cloner.get(site.getExecutionCourse());		}		catch (ExcepcaoPersistencia e)		{			throw new FenixServiceException(e);		}		component.setInfoExecutionCourse(executionCourse);        component.setInfoShiftsWithAssociatedClassesList(infoShiftsWithAssociatedClassesList);        return component;    }