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