1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.location.impl.campus |
17 | |
|
18 | |
import javax.persistence.Column |
19 | |
import javax.persistence.Entity |
20 | |
import javax.persistence.Id |
21 | |
import javax.persistence.Table |
22 | |
import org.hibernate.annotations.Type |
23 | |
import org.kuali.rice.core.api.mo.common.active.MutableInactivatable |
24 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
25 | |
import org.kuali.rice.location.api.campus.CampusType |
26 | |
import org.kuali.rice.location.api.campus.CampusTypeContract |
27 | |
|
28 | |
@Entity |
29 | |
@Table(name="KRLC_CMP_TYP_T") |
30 | |
public class CampusTypeBo extends PersistableBusinessObjectBase implements MutableInactivatable, CampusTypeContract { |
31 | |
@Id |
32 | |
@Column(name="CAMPUS_TYP_CD") |
33 | |
def String code; |
34 | |
|
35 | |
@Column(name="CMP_TYP_NM") |
36 | |
def String name; |
37 | |
|
38 | |
@Type(type="yes_no") |
39 | |
@Column(name="ACTV_IND") |
40 | |
def boolean active; |
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
|
47 | |
static CampusType to(CampusTypeBo bo) { |
48 | 0 | if (bo == null) { return null } |
49 | 0 | return CampusType.Builder.create(bo).build() |
50 | |
} |
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
static CampusTypeBo from(CampusType im) { |
58 | 0 | if (im == null) {return null} |
59 | |
|
60 | 0 | CampusTypeBo bo = new CampusTypeBo() |
61 | 0 | bo.code = im.code |
62 | 0 | bo.name = im.name |
63 | 0 | bo.active = im.active |
64 | 0 | bo.versionNumber = im.versionNumber |
65 | 0 | bo.objectId = im.objectId |
66 | |
|
67 | 0 | return bo; |
68 | |
} |
69 | |
} |