Package org.apache.commons.beanutils

Examples of org.apache.commons.beanutils.BeanComparator


    List<TimeZone> result = new ArrayList<TimeZone>();
    while (ids.hasMoreElements()) {
      result.add( TimeZone.getTimeZone( ids.nextElement() ) );
    }

    Collections.sort( result, new BeanComparator( "rawOffset" ) );

    return result;
  }
View Full Code Here


        } catch (Throwable t) {
            ApsSystemUtils.logThrowable(t, this, "searchUsers");
            //throw new ApsSystemException("Error searching users", t);
        }
        if (null != users) {
            BeanComparator comparator = new BeanComparator("username");
            Collections.sort(users, comparator);
        }
        return users;
    }
View Full Code Here

        || folderInfos.getMessages().size() != folder.getMessageCount()); //cambiato size
  }
  */
  protected void orderMessages(List<Message> messages) {
    //TODO PER ORA ORDINA PER DATA DISCENDENTE... POI STRUTTURARE OPZIONI
    BeanComparator comparator = new BeanComparator("receivedDate");
    Collections.sort(messages, comparator);
    Collections.reverse(messages);
  }
View Full Code Here

                String code = allowedShowlets.get(i);
                WidgetType type = customizableShowlets.get(code);
                WidgetCheckInfo info = new WidgetCheckInfo(type, false, currentLang);
                checkInfos.add(info);
            }
            BeanComparator comparator = new BeanComparator("title");
            Collections.sort(checkInfos, comparator);
            this.pageContext.setAttribute(this.getVar(), checkInfos);
        } catch (Throwable t) {
            ApsSystemUtils.logThrowable(t, this, "doStartTag");
            throw new JspException("Error on doStartTag", t);
View Full Code Here

  public List<IApsEntity> getContentTypes() {
    List<IApsEntity> entityPrototypes = null;
    try {
      Map<String, IApsEntity> modelMap = this.getContentManager().getEntityPrototypes();
      entityPrototypes = new ArrayList<IApsEntity>(modelMap.values());
      BeanComparator comparator = new BeanComparator("typeDescr");
      Collections.sort(entityPrototypes, comparator);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getContentTypes");
      throw new RuntimeException("Error extracting content types", t);
    }
View Full Code Here

        long positionInt = Math.round(position);
        String classId = String.valueOf(((int)positionInt+1));
        CloudInfoBean bean = new CloudInfoBean(treeNode, occurrence, classId, currentLang);
        beans.add(bean);
      }
      BeanComparator comparator = new BeanComparator("title");
      Collections.sort(beans, comparator);
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "buildCloudsInfoBeans");
      throw new ApsSystemException("Error building Cloud info", t);
    }
View Full Code Here

                strBuffer.append("<strong>");
                strBuffer.append(getMessageResource(pageContext, "public.degree.information.label.courseOf"));
                strBuffer.append(curricularYear + "&ordm; ano:</strong>");
            }

            Collections.sort(examsMap.getExecutionCourses(), new BeanComparator("sigla"));
            String rowClass = "notFirstRow"; // used for CSS style
            for (int i = 0; i < examsMap.getExecutionCourses().size(); i++) {
                InfoExecutionCourse infoExecutionCourse = (InfoExecutionCourse) examsMap.getExecutionCourses().get(i);

                if (user.equals("sop")) {
View Full Code Here

        strBuffer.append(" - <strong>" + examsMap.getInfoExecutionDegree().getInfoExecutionYear().getYear() + "</strong><br />");
        strBuffer.append("<table border='1' cellspacing='0' cellpadding='3' width='95%'>");

        renderExamsTableHeader(strBuffer, pageContext);

        Collections.sort(examsMap.getExecutionCourses(), new BeanComparator("nome"));

        for (int i = 0; i < examsMap.getExecutionCourses().size(); i++) {
            InfoExecutionCourse infoExecutionCourse = (InfoExecutionCourse) examsMap.getExecutionCourses().get(i);
            if (infoExecutionCourse.getCurricularYear().equals(year) && !infoExecutionCourse.getAssociatedInfoExams().isEmpty()) {
                strBuffer.append("<tr>");
View Full Code Here

                strBuffer.append("<td>" + infoExam.getDate() + "</td>");
                strBuffer.append("<td>" + infoExam.getBeginningHour() + "</td>");
                strBuffer.append("<td>" + infoExam.getEndHour() + "</td>");
                strBuffer.append("<td>");
                ComparatorChain comparatorChain = new ComparatorChain();
                comparatorChain.addComparator(new BeanComparator("infoRoom.capacidadeExame"), true);
                comparatorChain.addComparator(new BeanComparator("infoRoom.nome"));
                Collections.sort(infoExam.getWrittenEvaluationSpaceOccupations(), comparatorChain);
                for (int k = 0; k < infoExam.getWrittenEvaluationSpaceOccupations().size(); k++) {
                    if (k > 0) {
                        strBuffer.append(" ");
                    }
View Full Code Here

        final ExecutionSemester executionSemester = executionYear.getExecutionSemesterFor(semester);
        for (final Enrolment enrolment : curricularCourse.getEnrolmentsByExecutionPeriod(executionSemester)) {
            result.add(enrolment);
        }
        Collections.sort(result, new BeanComparator("studentCurricularPlan.registration.number"));

        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.