Package org.apache.commons.lang.builder

Examples of org.apache.commons.lang.builder.CompareToBuilder


            compare = -1;
        else
        {
            BaseVO castObj = (BaseVO) obj;

            CompareToBuilder builder = new CompareToBuilder();

            builder.append(this.getId(), castObj.getId());

            compare = builder.toComparison();
        }

        return compare;
    }
View Full Code Here


        }

        Collections.sort(list, new Comparator<SessionInfoBean>() {
            public int compare(SessionInfoBean bean1, SessionInfoBean bean2)
            {
                CompareToBuilder builder = new CompareToBuilder();

                builder.append(bean2.getLastAccessTime(), bean1.getLastAccessTime());
                builder.append(bean1.getUsername(), bean2.getUsername());

                return builder.toComparison();
            }
        });

        request.setAttribute("list", list);
View Full Code Here

    private static class EventCalendarComparator implements Comparator<EventCalendarVO>
    {
        public int compare(EventCalendarVO o1, EventCalendarVO o2)
        {
            CompareToBuilder builder = new CompareToBuilder();
           
            builder.append(o1.getParticipiantType(), o2.getParticipiantType());
            builder.append(o1.getCalendar().getUser().getUserName(), o2.getCalendar().getUser().getUserName());
           
            return builder.toComparison();
        }
View Full Code Here

    private static class EventPersonComparator implements Comparator<EventPersonVO>
    {
        public int compare(EventPersonVO o1, EventPersonVO o2)
        {
            CompareToBuilder builder = new CompareToBuilder();
           
            builder.append(o1.getPerson().getLastName(), o2.getPerson().getLastName());
            builder.append(o1.getPerson().getFirstName(), o2.getPerson().getFirstName());
           
            return builder.toComparison();
        }
View Full Code Here

    }

    /** @see Comparable#compareTo(Object) */
    public int compareTo(Rule r)
    {
        return new CompareToBuilder()
                .append(getAction(), r.getAction())
                .append(getIdentity(), r.getIdentity())
                .append(getPermission(), r.getPermission())
                .toComparison();
    }
View Full Code Here

    }

    @Override
    public int compare(ParticipantResult left, ParticipantResult right)
    {
        return new CompareToBuilder()
            .append(getTypeCode(left), getTypeCode(right))
            .append(left.getParticipantName(), right.getParticipantName())
            .toComparison();
    }
View Full Code Here

    }

    @Override
    public int compareTo(Rule r)
    {
        return new CompareToBuilder()
                .append(getAction(), r.getAction())
                .append(getIdentity(), r.getIdentity())
                .append(getPermission(), r.getPermission())
                .toComparison();
    }
View Full Code Here

  /**
   * ε­εŒ…δΌ˜ε…ˆ
   */
  public int compareTo(Profile other) {
    return new CompareToBuilder().append(other.actionPattern, this.actionPattern)
        .toComparison();
  }
View Full Code Here

    }
    indexes = newIndexes;
  }

  public int compareTo(Table o) {
    return new CompareToBuilder().append(getSchema(), o.getSchema()).append(getName(), o.getName())
        .toComparison();
  }
View Full Code Here

     
      Collections.sort(appVersionList, new Comparator<ApplicationVersionDescription>() {
        @Override
        public int compare(ApplicationVersionDescription o1,
            ApplicationVersionDescription o2) {
          return new CompareToBuilder().append(o2.getDateUpdated(), o1.getDateUpdated()).append(o2.getDateCreated(), o1.getDateUpdated()).toComparison();
        }
      });
     
      if (appVersionList.isEmpty()) {
        String message = "No version label supplied **AND** no app versions available.";
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.builder.CompareToBuilder

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.