Collection<ExecutionYear> executionYears = (List<ExecutionYear>) ServiceUtils.executeService(userView,
Collection<ExecutionYear> executionYears = (Collection<ExecutionYear>) ServiceUtils.executeService(userView,
    public ActionForward prepare(ActionMapping mapping, ActionForm form, HttpServletRequest request,            HttpServletResponse response) throws FenixFilterException, FenixServiceException {        IUserView userView = SessionUtils.getUserView(request);        Object[] args = { ExecutionYear.class };        Collection<ExecutionYear> executionYears = (List<ExecutionYear>) ServiceUtils.executeService(userView,                "ReadAllDomainObjects", args);        List<ExecutionYear> notClosedExecutionYears = (List<ExecutionYear>) CollectionUtils.select(                executionYears, new Predicate() {                    public boolean evaluate(Object arg0) {                        ExecutionYear executionYear = (ExecutionYear) arg0;                        return !executionYear.getState().equals(PeriodState.CLOSED);                    }                });        Iterator orderedExecutionYearsIter = new OrderedIterator(notClosedExecutionYears.iterator(),                new BeanComparator("beginDate"));        request.setAttribute("executionYears", orderedExecutionYearsIter);        DynaActionForm dynaForm = (DynaActionForm) form;        final Integer executionYearID = (Integer) dynaForm.get("executionYearID");        ExecutionYear executionYear = null;        if (executionYearID == null || executionYearID == 0) {            for (ExecutionYear tempExecutionYear : notClosedExecutionYears) {                if (tempExecutionYear.getState().equals(PeriodState.CURRENT)) {                    executionYear = tempExecutionYear;                    break;                }            }            dynaForm.set("executionYearID", executionYear.getIdInternal());        } else {            for (ExecutionYear tempExecutionYear : notClosedExecutionYears) {                if (tempExecutionYear.getIdInternal().equals(executionYearID)) {                    executionYear = tempExecutionYear;                    break;                }            }        }        List<ExecutionDegree> masterDegreeExecutions = (List<ExecutionDegree>) executionYear                .getExecutionDegreesByType(DegreeType.MASTER_DEGREE);        Iterator orderedExecutionDegreesIter = new OrderedIterator(masterDegreeExecutions.iterator(),                new BeanComparator("degreeCurricularPlan.name"));        request.setAttribute("masterDegreeExecutions", orderedExecutionDegreesIter);        return mapping.findForward("chooseMasterDegreeExecution");    }