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