1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.krms.impl.repository |
17 | |
|
18 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
19 | |
import org.kuali.rice.krms.api.repository.term.TermSpecificationDefinition; |
20 | |
import org.kuali.rice.krms.api.repository.term.TermSpecificationDefinitionContract; |
21 | |
|
22 | |
public class TermSpecificationBo extends PersistableBusinessObjectBase implements TermSpecificationDefinitionContract{ |
23 | |
|
24 | |
private static final long serialVersionUID = 1L; |
25 | |
|
26 | |
def String id |
27 | |
def String name |
28 | |
def String namespace |
29 | |
def String type |
30 | |
def String description |
31 | |
|
32 | 0 | def List<CategoryBo> categories = new ArrayList<CategoryBo>() |
33 | 0 | def List<ContextBo> contexts = new ArrayList<ContextBo>() |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
static TermSpecificationDefinition to(TermSpecificationBo bo) { |
41 | 0 | if (bo == null) { return null } |
42 | 0 | return org.kuali.rice.krms.api.repository.term.TermSpecificationDefinition.Builder.create(bo).build() |
43 | |
} |
44 | |
|
45 | |
|
46 | |
|
47 | |
|
48 | |
|
49 | |
|
50 | |
static TermSpecificationBo from(TermSpecificationDefinition im) { |
51 | 0 | if (im == null) { return null } |
52 | |
|
53 | 0 | TermSpecificationBo bo = new TermSpecificationBo() |
54 | 0 | bo.id = im.id |
55 | 0 | bo.namespace = im.namespace |
56 | 0 | bo.name = im.name |
57 | 0 | bo.type = im.type |
58 | 0 | bo.description = im.description |
59 | 0 | bo.categories = new ArrayList<CategoryBo>() |
60 | 0 | for (category in im.categories) { |
61 | 0 | bo.categories.add(CategoryBo.from(category)) |
62 | |
} |
63 | 0 | bo.versionNumber = im.versionNumber |
64 | |
|
65 | 0 | return bo |
66 | |
} |
67 | |
|
68 | |
} |