1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.impl.permission |
17 | |
|
18 | |
import javax.persistence.Column |
19 | |
import javax.persistence.Entity |
20 | |
import javax.persistence.Id |
21 | |
import javax.persistence.Table |
22 | |
import org.kuali.rice.kim.api.common.template.Template |
23 | |
import org.kuali.rice.kim.api.common.template.TemplateContract |
24 | |
import org.kuali.rice.kim.impl.common.template.TemplateBo |
25 | |
|
26 | |
@Entity |
27 | |
@Table(name="KRIM_PERM_TMPL_T") |
28 | |
public class PermissionTemplateBo extends TemplateBo implements TemplateContract { |
29 | |
private static final long serialVersionUID = 1L; |
30 | |
|
31 | |
@Id |
32 | |
@Column(name="PERM_TMPL_ID") |
33 | |
String id |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
static Template to(PermissionTemplateBo bo) { |
41 | 1 | if (bo == null) { |
42 | 0 | return null |
43 | |
} |
44 | |
|
45 | 1 | return Template.Builder.create(bo).build(); |
46 | |
} |
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
static PermissionTemplateBo from(Template im) { |
54 | 2 | if (im == null) { |
55 | 1 | return null |
56 | |
} |
57 | |
|
58 | 1 | PermissionTemplateBo bo = new PermissionTemplateBo() |
59 | 1 | bo.id = im.id |
60 | 1 | bo.namespaceCode = im.namespaceCode |
61 | 1 | bo.name = im.name |
62 | 1 | bo.description = im.description |
63 | 1 | bo.active = im.active |
64 | 1 | bo.kimTypeId = im.kimTypeId |
65 | 1 | bo.versionNumber = im.versionNumber |
66 | 1 | bo.objectId = im.objectId; |
67 | |
|
68 | 1 | return bo |
69 | |
} |
70 | |
|
71 | |
} |