Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.BeanComparator


        List detailedInfoProfessorshipList = getDetailedProfessorships(userView, infoPerson.getExternalId(), dynaForm, request);

        ComparatorChain chain = new ComparatorChain();

        Comparator executionPeriodComparator =
                new BeanComparator("infoProfessorship.infoExecutionCourse.infoExecutionPeriod.semester");
        Comparator nameComparator = new BeanComparator("infoProfessorship.infoExecutionCourse.nome");

        chain.addComparator(executionPeriodComparator);
        chain.addComparator(nameComparator);
        Collections.sort(detailedInfoProfessorshipList, chain);
View Full Code Here


    public final Integer createCandidacyNumber() {
        if (Bennu.getInstance().getCandidaciesSet().size() == 0) {
            return Integer.valueOf(1);
        }
        Candidacy candidacy = Collections.max(Bennu.getInstance().getCandidaciesSet(), new BeanComparator("number"));
        return candidacy.getNumber() + 1;
    }
View Full Code Here

    @Override
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
        User userView = getUserView(request);
        Student student = userView.getPerson().getStudent();
        ArrayList<StudentStatute> studentStatutes = new ArrayList<StudentStatute>(student.getStudentStatutesSet());
        Collections.sort(studentStatutes, new BeanComparator("beginExecutionPeriod.beginDateYearMonthDay"));
        request.setAttribute("studentStatutes", studentStatutes);
        return mapping.findForward("studentStatutes");
    }
View Full Code Here

                return new LabelValueBean(label, value);
            }

        });

        Comparator comparator = new BeanComparator("label", Collator.getInstance());
        Collections.sort((List) lableValueList, comparator);

        return lableValueList;
    }
View Full Code Here

            }

            java.util.ArrayList<Unit> associatedUniversityUnits =
                    new java.util.ArrayList<Unit>(selectedCountryUnit.getSubUnits(PartyTypeEnum.UNIVERSITY));

            Collections.sort(associatedUniversityUnits, new BeanComparator("nameI18n"));

            return associatedUniversityUnits;
        }
View Full Code Here

        setStudent(student);
        setExecutionCoursesAnnouncements(new ArrayList<ExecutionCoursesAnnouncements>());
        for (ExecutionCourse executionCourse : executionCourses) {
            addExecutionCoursesAnnouncement(new ExecutionCoursesAnnouncements(executionCourse));
        }
        Collections.sort(getExecutionCoursesAnnouncements(), new BeanComparator("executionCourse.name"));
    }
View Full Code Here

        }

        private Map<Branch, SortedSet<DegreeModuleScope>> getBranchMap(final DegreeCurricularPlan degreeCurricularPlan,
                final ExecutionSemester executionSemester) {
            final Map<Branch, SortedSet<DegreeModuleScope>> branchMap =
                    new TreeMap<Branch, SortedSet<DegreeModuleScope>>(new BeanComparator("name"));
            for (final CurricularCourse curricularCourse : degreeCurricularPlan.getCurricularCoursesSet()) {
                for (final CurricularCourseScope scope : curricularCourse.getScopesSet()) {
                    if (scope.isActiveForExecutionPeriod(executionSemester)) {
                        addToMap(branchMap, scope);
                    }
View Full Code Here

                            bolonhaStudentOptionalEnrollmentBean.getExecutionPeriod());
            final List<Context> childCurricularCourseContexts =
                    courseGroup.getValidChildContexts(CurricularCourse.class,
                            bolonhaStudentOptionalEnrollmentBean.getExecutionPeriod());

            Collections.sort(childCourseGroupContexts, new BeanComparator("childOrder"));
            Collections.sort(childCurricularCourseContexts, new BeanComparator("childOrder"));

            generateCurricularCourses(blockContainer, childCurricularCourseContexts, depth + getWidthDecreasePerLevel());

            for (final Context context : childCourseGroupContexts) {
                generateCourseGroup(blockContainer, (CourseGroup) context.getChildDegreeModule(), depth
View Full Code Here

        final DFACandidacyBean dfaCandidacyBean = (DFACandidacyBean) source;
        final List<DegreeCurricularPlan> result = new ArrayList<DegreeCurricularPlan>();
        if (dfaCandidacyBean.getDegree() != null && dfaCandidacyBean.getExecutionYear() != null) {
            result.addAll(dfaCandidacyBean.getDegree().getDegreeCurricularPlansForYear(dfaCandidacyBean.getExecutionYear()));
            Collections.sort(result, new BeanComparator("name"));
        } else {
            dfaCandidacyBean.setDegreeCurricularPlan(null);
        }
        return result;
    }
View Full Code Here

        final DFACandidacyBean dfaCandidacyBean = (DFACandidacyBean) source;
        final List<DegreeCurricularPlan> result = new ArrayList<DegreeCurricularPlan>();
        if (dfaCandidacyBean.getDegree() != null) {
            result.addAll(dfaCandidacyBean.getDegree().getDegreeCurricularPlansSet());
            Collections.sort(result, new BeanComparator("name"));
        } else {
            dfaCandidacyBean.setDegreeCurricularPlan(null);
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.beanutils.BeanComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.