KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > javabb > vo > UserRank


1 package org.javabb.vo;
2
3 import java.io.Serializable JavaDoc;
4 import org.apache.commons.lang.builder.CompareToBuilder;
5 import org.apache.commons.lang.builder.EqualsBuilder;
6 import org.apache.commons.lang.builder.HashCodeBuilder;
7 import org.apache.commons.lang.builder.ToStringBuilder;
8
9 /**
10  * @author Dalton Camargo
11  */

12 public class UserRank implements Comparable JavaDoc, Serializable JavaDoc {
13     private Long JavaDoc rankId;
14     private String JavaDoc rankName;
15     private Integer JavaDoc rankMin;
16     private Integer JavaDoc rankMax;
17     private String JavaDoc rankImage;
18     
19
20     public Long JavaDoc getRankId() {
21         return rankId;
22     }
23     public void setRankId(Long JavaDoc rankId) {
24         this.rankId = rankId;
25     }
26     public String JavaDoc getRankImage() {
27         return rankImage;
28     }
29     public void setRankImage(String JavaDoc rankImage) {
30         this.rankImage = rankImage;
31     }
32     public Integer JavaDoc getRankMax() {
33         return rankMax;
34     }
35     public void setRankMax(Integer JavaDoc rankMax) {
36         this.rankMax = rankMax;
37     }
38     public Integer JavaDoc getRankMin() {
39         return rankMin;
40     }
41     public void setRankMin(Integer JavaDoc rankMin) {
42         this.rankMin = rankMin;
43     }
44     public String JavaDoc getRankName() {
45         return rankName;
46     }
47     public void setRankName(String JavaDoc rankName) {
48         this.rankName = rankName;
49     }
50     /**
51      * @see java.lang.Comparable#compareTo(Object)
52      */

53     public int compareTo(Object JavaDoc object) {
54         UserRank myClass = (UserRank) object;
55         return new CompareToBuilder().append(this.rankId, myClass.rankId)
56                 .toComparison();
57     }
58     /**
59      * @see java.lang.Object#equals(Object)
60      */

61     public boolean equals(Object JavaDoc object) {
62         if (!(object instanceof UserRank)) {
63             return false;
64         }
65         UserRank rhs = (UserRank) object;
66         return new EqualsBuilder().appendSuper(super.equals(object))
67                 .append(this.rankId, rhs.rankId)
68                 .isEquals();
69     }
70     /**
71      * @see java.lang.Object#hashCode()
72      */

73     public int hashCode() {
74         return new HashCodeBuilder(-602096293, -334566575).appendSuper(
75                 super.hashCode()).append(
76                         this.rankId).toHashCode();
77     }
78     /**
79      * @see java.lang.Object#toString()
80      */

81     public String JavaDoc toString() {
82         return new ToStringBuilder(this).append("rankMin", this.rankMin)
83                 .append("rankName", this.rankName)
84                 .append("rankId", this.rankId).append("rankImage",
85                         this.rankImage).append("rankMax", this.rankMax)
86                 .toString();
87     }
88     
89     
90 }
91
Popular Tags