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.proposition.PropositionParameter |
20 | |
import org.kuali.rice.krms.api.repository.proposition.PropositionParameterContract |
21 | |
|
22 | |
public class PropositionParameterBo extends PersistableBusinessObjectBase implements PropositionParameterContract { |
23 | |
|
24 | |
def String id |
25 | |
def String propId |
26 | |
def String value |
27 | |
def String parameterType |
28 | |
def Integer sequenceNumber |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
static PropositionParameter to(PropositionParameterBo bo) { |
37 | 0 | if (bo == null) { return null } |
38 | 0 | return org.kuali.rice.krms.api.repository.proposition.PropositionParameter.Builder.create(bo).build() |
39 | |
} |
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
|
45 | |
|
46 | |
static List<PropositionParameter> to(List<PropositionParameterBo> bos) { |
47 | 0 | if (bos == null) { return null } |
48 | 0 | List<PropositionParameter> parms = new ArrayList<PropositionParameter>(); |
49 | 0 | for (PropositionParameterBo p : bos){ |
50 | 0 | parms.add(PropositionParameter.Builder.create(p).build()) |
51 | |
} |
52 | 0 | return Collections.unmodifiableList(parms) |
53 | |
} |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
static PropositionParameterBo from(PropositionParameter im) { |
60 | 0 | if (im == null) { return null } |
61 | |
|
62 | 0 | PropositionParameterBo bo = new PropositionParameterBo() |
63 | 0 | bo.id = im.id |
64 | 0 | bo.propId = im.propId |
65 | 0 | bo.value = im.value |
66 | 0 | bo.parameterType = im.parameterType |
67 | 0 | bo.sequenceNumber = im.sequenceNumber |
68 | 0 | bo.versionNumber = im.versionNumber |
69 | 0 | return bo |
70 | |
} |
71 | |
|
72 | |
static List<PropositionParameterBo> from(List<PropositionParameter> ims){ |
73 | 0 | if (ims == null) {return null } |
74 | 0 | List<PropositionParameterBo> bos = new ArrayList<PropositionParameterBo>(); |
75 | 0 | for (PropositionParameterBo im : ims){ |
76 | 0 | PropositionParameterBo bo = new PropositionParameterBo() |
77 | 0 | bo.id = im.id |
78 | 0 | bo.propId = im.propId |
79 | 0 | bo.value = im.value |
80 | 0 | bo.parameterType = im.parameterType |
81 | 0 | bo.sequenceNumber = im.sequenceNumber |
82 | 0 | bo.versionNumber = im.versionNumber |
83 | 0 | bos.add(bo); |
84 | |
} |
85 | 0 | return Collections.unmodifiableList(bos) |
86 | |
} |
87 | |
|
88 | |
} |