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