1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
package org.kuali.rice.location.framework.campus |
19 | |
|
20 | |
import org.kuali.rice.krad.bo.ExternalizableBusinessObject |
21 | |
import org.kuali.rice.core.api.mo.common.active.MutableInactivatable |
22 | |
import org.kuali.rice.location.api.campus.CampusContract |
23 | |
|
24 | |
|
25 | |
public class CampusEbo implements MutableInactivatable, CampusContract, ExternalizableBusinessObject { |
26 | |
private static final long serialVersionUID = 787567094298971223L; |
27 | |
|
28 | |
def String code; |
29 | |
def String name; |
30 | |
def String shortName; |
31 | |
def String campusTypeCode; |
32 | |
def boolean active; |
33 | |
def CampusTypeEbo campusType; |
34 | |
def Long versionNumber; |
35 | |
def String objectId; |
36 | |
|
37 | |
@Override |
38 | |
CampusTypeEbo getCampusType() { |
39 | 0 | return campusType |
40 | |
} |
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
static org.kuali.rice.location.api.campus.Campus to(CampusEbo bo) { |
48 | 0 | if (bo == null) { |
49 | 0 | return null |
50 | |
} |
51 | |
|
52 | 0 | return org.kuali.rice.location.api.campus.Campus.Builder.create(bo).build(); |
53 | |
} |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
static CampusEbo from(org.kuali.rice.location.api.campus.Campus im) { |
61 | 0 | if (im == null) { |
62 | 0 | return null |
63 | |
} |
64 | |
|
65 | 0 | CampusEbo bo = new CampusEbo() |
66 | 0 | bo.code = im.code |
67 | 0 | bo.name = im.name |
68 | 0 | bo.shortName = im.shortName |
69 | 0 | bo.active = im.active |
70 | 0 | bo.campusTypeCode = im.campusType.code |
71 | |
|
72 | 0 | bo.campusType = CampusTypeEbo.from(im.campusType) |
73 | 0 | bo.versionNumber = im.versionNumber |
74 | 0 | bo.objectId = im.objectId; |
75 | |
|
76 | 0 | return bo |
77 | |
} |
78 | |
|
79 | |
void refresh() { } |
80 | |
|
81 | |
} |