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