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