1 | |
package org.kuali.rice.shareddata.impl.county |
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 CountyId implements Serializable { |
26 | |
|
27 | |
@Id |
28 | |
@Column(name = "COUNTY_CD") |
29 | |
def final String code; |
30 | |
|
31 | |
@Id |
32 | |
@Column(name = "POSTAL_CNTRY_CD") |
33 | |
def final String countryCode; |
34 | |
|
35 | |
@Id |
36 | |
@Column(name = "STATE_CD") |
37 | |
def final String stateCode; |
38 | |
|
39 | |
CountyId() { } |
40 | |
|
41 | |
CountyId(String code, String countryCode, String stateCode) { |
42 | 0 | this.code = code; |
43 | 0 | this.countryCode = countryCode; |
44 | 0 | this.stateCode = stateCode; |
45 | |
} |
46 | |
|
47 | |
@Override |
48 | |
int hashCode() { |
49 | 0 | return HashCodeBuilder.reflectionHashCode(this); |
50 | |
} |
51 | |
|
52 | |
@Override |
53 | |
boolean equals(Object obj) { |
54 | 0 | return EqualsBuilder.reflectionEquals(obj, this); |
55 | |
} |
56 | |
|
57 | |
@Override |
58 | |
String toString() { |
59 | 0 | return ToStringBuilder.reflectionToString(this); |
60 | |
} |
61 | |
} |
62 | |
|