try { infoExecutionCourse = (InfoExecutionCourse) Cloner.get(executionCourse); } catch (ExcepcaoPersistencia e) { throw new RuntimeException(e); }
infoExecutionCourse = (InfoExecutionCourse) Cloner.get(executionCourse);
    private List getInfoLecturingExecutionCourses(ISuportePersistente sp, ITeacher teacher)        throws ExcepcaoPersistencia    {        IPersistentProfessorship persistentProfessorship = sp.getIPersistentProfessorship();        final IPersistentExecutionYear persistentExecutionYear = sp.getIPersistentExecutionYear();        List professorships = persistentProfessorship.readByTeacher(teacher);        // filter only the execution courses of the current execution year        professorships = (List) CollectionUtils.select(professorships, new Predicate()        {            IExecutionYear executionYear = persistentExecutionYear.readCurrentExecutionYear();            public boolean evaluate(Object o)            {                IProfessorship professorship = (IProfessorship) o;                IExecutionCourse executionCourse = professorship.getExecutionCourse();                IExecutionYear executionYear = executionCourse.getExecutionPeriod().getExecutionYear();                return executionYear.equals(this.executionYear);            }        });        List infoExecutionCourses = (List) CollectionUtils.collect(professorships, new Transformer()        {            public Object transform(Object o)            {                IProfessorship professorship = (IProfessorship) o;                IExecutionCourse executionCourse = professorship.getExecutionCourse();                List curricularCourses = executionCourse.getAssociatedCurricularCourses();                List infoCurricularCourses =                    (List) CollectionUtils.collect(curricularCourses, new Transformer()                {                    public Object transform(Object o)                    {                        ICurricularCourse curricularCourse = (ICurricularCourse) o;                        return Cloner.copyCurricularCourse2InfoCurricularCourse(curricularCourse);                    }                });                InfoExecutionCourse infoExecutionCourse;				try				{					infoExecutionCourse = (InfoExecutionCourse) Cloner.get(executionCourse);				}				catch (ExcepcaoPersistencia e)				{					throw new RuntimeException(e);				}				infoExecutionCourse.setAssociatedInfoCurricularCourses(infoCurricularCourses);                return infoExecutionCourse;            }        });        return infoExecutionCourses;    }