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