1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.core.framework.parameter |
17 | |
|
18 | |
import org.kuali.rice.core.api.parameter.EvaluationOperator |
19 | |
import org.kuali.rice.core.api.parameter.ParameterContract |
20 | |
import org.kuali.rice.krad.bo.ExternalizableBusinessObject |
21 | |
|
22 | |
|
23 | |
class ParameterEbo implements ParameterContract, ExternalizableBusinessObject { |
24 | |
|
25 | |
private static final long serialVersionUID = 1L; |
26 | |
|
27 | |
def String namespaceCode |
28 | |
def String componentCode |
29 | |
def String name |
30 | |
def String applicationId |
31 | |
def String value |
32 | |
def String description |
33 | |
def String parameterTypeCode |
34 | |
def String evaluationOperatorCode |
35 | |
def ParameterTypeEbo parameterType |
36 | |
def Long versionNumber |
37 | |
def String objectId |
38 | |
|
39 | |
@Override |
40 | |
EvaluationOperator getEvaluationOperator() { |
41 | 0 | return EvaluationOperator.fromCode(evaluationOperatorCode); |
42 | |
} |
43 | |
|
44 | |
@Override |
45 | |
ParameterTypeEbo getParameterType() { |
46 | 0 | return parameterType |
47 | |
} |
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
static org.kuali.rice.core.api.parameter.Parameter to(ParameterEbo bo) { |
55 | 0 | if (bo == null) { |
56 | 0 | return null |
57 | |
} |
58 | |
|
59 | 0 | return org.kuali.rice.core.api.parameter.Parameter.Builder.create(bo).build(); |
60 | |
} |
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
|
67 | |
static ParameterEbo from(org.kuali.rice.core.api.parameter.Parameter im) { |
68 | 0 | if (im == null) { |
69 | 0 | return null |
70 | |
} |
71 | |
|
72 | 0 | ParameterEbo bo = new ParameterEbo() |
73 | 0 | bo.namespaceCode = im.namespaceCode |
74 | 0 | bo.componentCode = im.componentCode |
75 | 0 | bo.name = im.name |
76 | 0 | bo.applicationId = im.applicationId |
77 | 0 | bo.value = im.value |
78 | 0 | bo.description = im.description |
79 | 0 | bo.parameterTypeCode = im.parameterType.code |
80 | 0 | bo.evaluationOperatorCode = im.evaluationOperator.code |
81 | |
|
82 | 0 | bo.parameterType = ParameterTypeEbo.from(im.parameterType) |
83 | 0 | bo.versionNumber = im.versionNumber |
84 | 0 | bo.objectId = im.objectId |
85 | |
|
86 | 0 | return bo |
87 | |
} |
88 | |
|
89 | |
void refresh() { } |
90 | |
} |