1 | |
package org.kuali.rice.shareddata.impl.postalcode |
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 | |
final class PostalCodeId { |
26 | |
|
27 | |
@Id |
28 | |
@Column(name="POSTAL_CNTRY_CD") |
29 | |
def final String countryCode; |
30 | |
|
31 | |
@Id |
32 | |
@Column(name="POSTAL_CD") |
33 | |
def final String code; |
34 | |
|
35 | |
PostalCodeId() { } |
36 | |
|
37 | |
PostalCodeId(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 | |
} |