Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.BeanComparator


                            infoCurricularCourses.add(InfoCurricularCourse.newInfoFromDomain(curricularCourse));
                        }
                    }
                }
            }
            Collections.sort(infoCurricularCourses, new BeanComparator("name"));
            request.setAttribute("infoCurricularCourses", infoCurricularCourses);

            return mapping.findForward("associateCurricularCourse");

        } catch (DomainException e) {
View Full Code Here


                    + " "
                    + messages.getMessage(getLocale(request), "public.degree.information.label.in")
                    + " "
                    + degree.getNameFor(academicInterval).getContent() + part, executionDegree.getExternalId().toString()));
        }
        Collections.sort(executionDegreeLabelValueBeans, new BeanComparator("label"));
        request.setAttribute("executionDegreeLabelValueBeans", executionDegreeLabelValueBeans);

        return mapping.findForward("showForm");
    }
View Full Code Here

        if (name != null) {
            edificios.add(new LabelValueBean(name, value));
        }

        final List<InfoBuilding> infoBuildings = ReadBuildings.run();
        Collections.sort(infoBuildings, new BeanComparator("name"));

        for (InfoBuilding infoBuilding : infoBuildings) {
            edificios.add(new LabelValueBean(infoBuilding.getName(), infoBuilding.getName()));
        }
View Full Code Here

            throws FenixServiceException {

        List<InfoClass> infoClasses = ReadClassesByExecutionCourse.runReadClassesByExecutionCourse(executionCourse);

        if (infoClasses != null && !infoClasses.isEmpty()) {
            Collections.sort(infoClasses, new BeanComparator("nome"));
            request.setAttribute(PresentationConstants.LIST_INFOCLASS, infoClasses);
        }
    }
View Full Code Here

            } else {
                newAvailableInfoRoom = availableInfoRoom;
            }
        }
        if (newAvailableInfoRoom != null && !newAvailableInfoRoom.isEmpty()) {
            Collections.sort(newAvailableInfoRoom, new BeanComparator("nome"));
            String[] availableRoomId = new String[newAvailableInfoRoom.size()];
            Iterator<InfoRoom> iter = newAvailableInfoRoom.iterator();
            int i = 0;
            while (iter.hasNext()) {
                InfoRoom elem = iter.next();
View Full Code Here

            final Space room = FenixFramework.getDomainObject(element);
            availableRooms.add(InfoRoom.newInfoFromDomain(room));
        }
        if ((sortParameter != null) && (sortParameter.length() != 0)) {
            if (sortParameter.equals("name")) {
                Collections.sort(availableRooms, new BeanComparator("nome"));
            } else if (sortParameter.equals("type")) {
                Collections.sort(availableRooms, new BeanComparator("tipo"));
            } else if (sortParameter.equals("building")) {
                Collections.sort(availableRooms, new BeanComparator("edificio"));
            } else if (sortParameter.equals("floor")) {
                Collections.sort(availableRooms, new BeanComparator("piso"));
            } else if (sortParameter.equals("normal")) {
                Collections.sort(availableRooms, new ReverseComparator(new BeanComparator("capacidadeNormal")));
            } else if (sortParameter.equals("exam")) {
                Collections.sort(availableRooms, new ReverseComparator(new BeanComparator("capacidadeExame")));
            }
        } else {
            Collections.sort(availableRooms, new BeanComparator("nome"));
        }

        String sdate = roomSearchForm.get("day") + "/" + roomSearchForm.get("month") + "/" + roomSearchForm.get("year");
        String startTime = roomSearchForm.get("beginningHour") + ":" + roomSearchForm.get("beginningMinute");
        String endTime = roomSearchForm.get("endHour") + ":" + roomSearchForm.get("endMinute");
View Full Code Here

            InfoClass infoClass = InfoClass.newInfoFromDomain(schoolClass);
            infoClassesList.add(infoClass);
        }

        if (infoClassesList != null && !infoClassesList.isEmpty()) {
            BeanComparator nameComparator = new BeanComparator("nome");
            Collections.sort(infoClassesList, nameComparator);

            request.setAttribute(PresentationConstants.CLASSES, infoClassesList);
        }
        request.setAttribute("executionDegreeD", executionDegree);
View Full Code Here

        List<InfoExecutionDegree> executionDegrees =
                ReadExecutionDegreesByExecutionYearAndDegreeType.run(infoExecutionPeriod.getInfoExecutionYear().getYear(), null);

        ComparatorChain comparatorChain = new ComparatorChain();

        comparatorChain.addComparator(new BeanComparator("infoDegreeCurricularPlan.infoDegree.tipoCurso"));
        comparatorChain.addComparator(new BeanComparator("infoDegreeCurricularPlan.infoDegree.nome"));

        Collections.sort(executionDegrees, comparatorChain);

        MessageResources messageResources = this.getResources(request, "ENUMERATION_RESOURCES");
        executionDegrees = InfoExecutionDegree.buildLabelValueBeansForList(executionDegrees, messageResources);
View Full Code Here

        List executionPeriodsNotClosed = ReadNotClosedExecutionPeriods.run();

        setChoosedExecutionPeriod(request, executionPeriodsNotClosed, personExecutionCourseForm);

        BeanComparator initialDateComparator = new BeanComparator("beginDate");
        Collections.sort(executionPeriodsNotClosed, new ReverseComparator(initialDateComparator));

        request.setAttribute("executionPeriods", executionPeriodsNotClosed);
    }
View Full Code Here

        List executionCourses = ReadExecutionCoursesByExecutionDegreeService.run(executionDegreeId, executionPeriodId);
        String personId = (String) personExecutionCourseForm.get("teacherId");

        List executionCoursesToRemove = ReadExecutionCoursesByTeacherResponsibility.run(personId);
        executionCourses.removeAll(executionCoursesToRemove);
        Collections.sort(executionCourses, new BeanComparator("nome"));

        request.setAttribute("executionCourses", executionCourses);

    }
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.