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