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