1 | |
package org.kuali.rice.shareddata.impl.state |
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
import javax.persistence.Column |
20 | |
import javax.persistence.Id |
21 | |
import org.apache.commons.lang.builder.EqualsBuilder |
22 | |
import org.apache.commons.lang.builder.HashCodeBuilder |
23 | |
import org.apache.commons.lang.builder.ToStringBuilder |
24 | |
|
25 | |
class StateId implements Serializable { |
26 | |
|
27 | |
@Id |
28 | |
@Column(name = "POSTAL_CNTRY_CD") |
29 | |
def final String countryCode; |
30 | |
@Id |
31 | |
@Column(name = "POSTAL_STATE_CD") |
32 | |
def final String code; |
33 | |
|
34 | |
StateId() { } |
35 | |
|
36 | |
StateId(String countryCode, String code) { |
37 | 0 | this.countryCode = countryCode; |
38 | 0 | this.code = code; |
39 | |
} |
40 | |
|
41 | |
@Override |
42 | |
int hashCode() { |
43 | 0 | return HashCodeBuilder.reflectionHashCode(this); |
44 | |
} |
45 | |
|
46 | |
@Override |
47 | |
boolean equals(Object obj) { |
48 | 0 | return EqualsBuilder.reflectionEquals(obj, this); |
49 | |
} |
50 | |
|
51 | |
@Override |
52 | |
String toString() { |
53 | 0 | return ToStringBuilder.reflectionToString(this); |
54 | |
} |
55 | |
} |
56 | |
|