1 | |
package org.kuali.rice.krms.impl.repository |
2 | |
|
3 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
4 | |
import org.kuali.rice.krms.api.repository.proposition.PropositionParameter |
5 | |
import org.kuali.rice.krms.api.repository.proposition.PropositionParameterContract |
6 | |
|
7 | |
public class PropositionParameterBo extends PersistableBusinessObjectBase implements PropositionParameterContract { |
8 | |
|
9 | |
def String id |
10 | |
def String propId |
11 | |
def String value |
12 | |
def String parameterType |
13 | |
def Integer sequenceNumber |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
static PropositionParameter to(PropositionParameterBo bo) { |
22 | 8 | if (bo == null) { return null } |
23 | 4 | return org.kuali.rice.krms.api.repository.proposition.PropositionParameter.Builder.create(bo).build() |
24 | |
} |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
static List<PropositionParameter> to(List<PropositionParameterBo> bos) { |
32 | 2 | if (bos == null) { return null } |
33 | 1 | List<PropositionParameter> parms = new ArrayList<PropositionParameter>(); |
34 | 1 | for (PropositionParameterBo p : bos){ |
35 | 3 | parms.add(PropositionParameter.Builder.create(p).build()) |
36 | |
} |
37 | 1 | return Collections.unmodifiableList(parms) |
38 | |
} |
39 | |
|
40 | |
|
41 | |
|
42 | |
|
43 | |
|
44 | |
static PropositionParameterBo from(PropositionParameter im) { |
45 | 110 | if (im == null) { return null } |
46 | |
|
47 | 110 | PropositionParameterBo bo = new PropositionParameterBo() |
48 | 110 | bo.id = im.id |
49 | 110 | bo.propId = im.propId |
50 | 110 | bo.value = im.value |
51 | 110 | bo.parameterType = im.parameterType |
52 | 110 | bo.sequenceNumber = im.sequenceNumber |
53 | 110 | bo.versionNumber = im.versionNumber |
54 | 110 | return bo |
55 | |
} |
56 | |
|
57 | |
static List<PropositionParameterBo> from(List<PropositionParameter> ims){ |
58 | 0 | if (ims == null) {return null } |
59 | 0 | List<PropositionParameterBo> bos = new ArrayList<PropositionParameterBo>(); |
60 | 0 | for (PropositionParameterBo im : ims){ |
61 | 0 | PropositionParameterBo bo = new PropositionParameterBo() |
62 | 0 | bo.id = im.id |
63 | 0 | bo.propId = im.propId |
64 | 0 | bo.value = im.value |
65 | 0 | bo.parameterType = im.parameterType |
66 | 0 | bo.sequenceNumber = im.sequenceNumber |
67 | 0 | bo.versionNumber = im.versionNumber |
68 | 0 | bos.add(bo); |
69 | |
} |
70 | 0 | return Collections.unmodifiableList(bos) |
71 | |
} |
72 | |
|
73 | |
} |