1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.location.framework.postalcode |
17 | |
|
18 | |
import org.kuali.rice.krad.bo.ExternalizableBusinessObject |
19 | |
|
20 | |
import org.kuali.rice.location.api.postalcode.PostalCode |
21 | |
import org.kuali.rice.location.api.postalcode.PostalCodeContract |
22 | |
import org.kuali.rice.location.framework.country.CountryEbo |
23 | |
import org.kuali.rice.location.framework.county.CountyEbo |
24 | |
import org.kuali.rice.location.framework.state.StateEbo |
25 | |
import org.kuali.rice.core.api.mo.common.active.MutableInactivatable |
26 | |
|
27 | |
|
28 | |
class PostalCodeEbo implements MutableInactivatable, PostalCodeContract, ExternalizableBusinessObject { |
29 | |
def String code; |
30 | |
def String countryCode; |
31 | |
def String cityName; |
32 | |
def String stateCode; |
33 | |
def String countyCode; |
34 | |
def boolean active; |
35 | |
def CountryEbo country; |
36 | |
def StateEbo state; |
37 | |
def CountyEbo county; |
38 | |
def Long versionNumber; |
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
static PostalCode to(PostalCodeEbo bo) { |
46 | 0 | if (bo == null) { |
47 | 0 | return null |
48 | |
} |
49 | |
|
50 | 0 | return PostalCode.Builder.create(bo).build(); |
51 | |
} |
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
static PostalCodeEbo from(PostalCode im) { |
59 | 0 | if (im == null) { |
60 | 0 | return null |
61 | |
} |
62 | |
|
63 | 0 | PostalCodeEbo bo = new PostalCodeEbo() |
64 | 0 | bo.code = im.code |
65 | 0 | bo.countryCode = im.countryCode |
66 | 0 | bo.cityName = im.cityName |
67 | 0 | bo.active = im.active |
68 | 0 | bo.stateCode = im.stateCode |
69 | 0 | bo.cityName = im.cityName |
70 | 0 | bo.versionNumber = im.versionNumber |
71 | |
|
72 | 0 | return bo |
73 | |
} |
74 | |
|
75 | |
void refresh() { } |
76 | |
} |