ISuportePersistente sp = null; try { sp = PersistenceSupportFactory.getDefaultPersistenceSupport(); } catch (Exception e) { e.printStackTrace(); }
    public List run(Integer degreeCurricularPlanID) {        List result = null;        ISuportePersistente sp = null;        try {            sp = PersistenceSupportFactory.getDefaultPersistenceSupport();        } catch (Exception e) {            e.printStackTrace();        }        IPersistentDegreeCurricularPlan degreeCurricularPlanDAO = sp                .getIPersistentDegreeCurricularPlan();        IPersistentExecutionYear executionYearDAO = sp.getIPersistentExecutionYear();        Date end = null;        Date start = null;        //End date of the current year        try {            end = executionYearDAO.readCurrentExecutionYear().getEndDate();        } catch (Exception e) {            e.printStackTrace();        }        //Start date of the degree curricular plan        try {            start = ((DegreeCurricularPlan) (degreeCurricularPlanDAO.readByOID(                    DegreeCurricularPlan.class, degreeCurricularPlanID))).getInitialDate();        } catch (Exception e) {            e.printStackTrace();        }        List executionYears = null;        try {            executionYears = executionYearDAO.readExecutionYearsInPeriod(start, end);        } catch (ExcepcaoPersistencia e1) {            // TODO Auto-generated catch block            e1.printStackTrace();        }        result = (List) CollectionUtils.collect(executionYears, new Transformer() {            public Object transform(Object input) {                IExecutionYear executionYear = (IExecutionYear) input;                InfoExecutionYear infoExecutionYear = (InfoExecutionYear) Cloner.get(executionYear);                return infoExecutionYear;            }        });        return result;    }