1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.ksb.messaging.remotedservices;
17
18 import javax.xml.bind.annotation.XmlRootElement;
19
20
21
22
23
24
25
26 @XmlRootElement
27 public class BaseballCard {
28
29 private String cardType;
30 private String playerName;
31 private Integer year;
32
33 public BaseballCard() {
34 }
35
36 public BaseballCard(String playerName, String cardType, Integer year) {
37 this.playerName = playerName;
38 this.cardType = cardType;
39 this.year = year;
40 }
41
42
43
44
45
46
47 public void setCardType(String cardType) {
48 this.cardType = cardType;
49 }
50
51
52
53
54 public void setPlayerName(String playerName) {
55 this.playerName = playerName;
56 }
57
58
59
60
61 public void setYear(Integer year) {
62 this.year = year;
63 }
64
65 public String getCardType() {
66 return cardType;
67 }
68
69 public String getPlayerName() {
70 return playerName;
71 }
72
73 public Integer getYear() {
74 return year;
75 }
76
77
78
79
80 @Override
81 public int hashCode() {
82 final int prime = 31;
83 int result = 1;
84 result = prime * result + ((this.cardType == null) ? 0 : this.cardType.hashCode());
85 result = prime * result + ((this.playerName == null) ? 0 : this.playerName.hashCode());
86 result = prime * result + ((this.year == null) ? 0 : this.year.hashCode());
87 return result;
88 }
89
90
91
92
93 @Override
94 public boolean equals(Object obj) {
95 if (this == obj)
96 return true;
97 if (obj == null)
98 return false;
99 if (getClass() != obj.getClass())
100 return false;
101 BaseballCard other = (BaseballCard) obj;
102 if (this.cardType == null) {
103 if (other.cardType != null)
104 return false;
105 } else if (!this.cardType.equals(other.cardType))
106 return false;
107 if (this.playerName == null) {
108 if (other.playerName != null)
109 return false;
110 } else if (!this.playerName.equals(other.playerName))
111 return false;
112 if (this.year == null) {
113 if (other.year != null)
114 return false;
115 } else if (!this.year.equals(other.year))
116 return false;
117 return true;
118 };
119
120
121
122 }