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.krad.bo.ExternalizableBusinessObject |
20 | |
|
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 | |
import org.kuali.rice.krad.bo.MutableInactivatable |
27 | |
|
28 | |
|
29 | |
class PostalCodeEbo implements MutableInactivatable, PostalCodeContract, ExternalizableBusinessObject { |
30 | |
def String code; |
31 | |
def String countryCode; |
32 | |
def String cityName; |
33 | |
def String stateCode; |
34 | |
def String countyCode; |
35 | |
def boolean active; |
36 | |
def CountryEbo country; |
37 | |
def StateEbo state; |
38 | |
def CountyEbo county; |
39 | |
def Long versionNumber; |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
static PostalCode to(PostalCodeEbo bo) { |
47 | 0 | if (bo == null) { |
48 | 0 | return null |
49 | |
} |
50 | |
|
51 | 0 | return PostalCode.Builder.create(bo).build(); |
52 | |
} |
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
static PostalCodeEbo from(PostalCode im) { |
60 | 0 | if (im == null) { |
61 | 0 | return null |
62 | |
} |
63 | |
|
64 | 0 | PostalCodeEbo bo = new PostalCodeEbo() |
65 | 0 | bo.code = im.code |
66 | 0 | bo.countryCode = im.countryCode |
67 | 0 | bo.cityName = im.cityName |
68 | 0 | bo.active = im.active |
69 | 0 | bo.stateCode = im.stateCode |
70 | 0 | bo.cityName = im.cityName |
71 | 0 | bo.versionNumber = im.versionNumber |
72 | |
|
73 | 0 | return bo |
74 | |
} |
75 | |
|
76 | |
void refresh() { } |
77 | |
} |