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