1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.r2.common.dto; |
18 | |
|
19 | |
import java.io.Serializable; |
20 | |
import java.util.ArrayList; |
21 | |
import java.util.Collections; |
22 | |
import java.util.List; |
23 | |
|
24 | |
import javax.xml.bind.annotation.XmlAccessType; |
25 | |
import javax.xml.bind.annotation.XmlAccessorType; |
26 | |
import javax.xml.bind.annotation.XmlAnyElement; |
27 | |
import javax.xml.bind.annotation.XmlElement; |
28 | |
import javax.xml.bind.annotation.XmlElementWrapper; |
29 | |
import javax.xml.bind.annotation.XmlType; |
30 | |
|
31 | |
import org.kuali.student.r2.common.infc.Comparison; |
32 | |
import org.w3c.dom.Element; |
33 | |
|
34 | |
@XmlAccessorType(XmlAccessType.FIELD) |
35 | |
@XmlType(name = "ComparisonInfo", propOrder = { |
36 | |
"fieldKey", "operator", "values", "isIgnoreCase", |
37 | |
"_futureElements"}) |
38 | |
|
39 | |
public class ComparisonInfo |
40 | |
implements Comparison, Serializable { |
41 | |
|
42 | |
private static final long serialVersionUID = 1L; |
43 | |
|
44 | |
@XmlElement |
45 | |
private String fieldKey; |
46 | |
|
47 | |
@XmlElement |
48 | |
private String operator; |
49 | |
|
50 | |
@XmlElement |
51 | |
private List<String> values; |
52 | |
|
53 | |
@XmlElement |
54 | |
private boolean isIgnoreCase; |
55 | |
|
56 | |
@XmlAnyElement |
57 | |
private List<Element> _futureElements; |
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | 0 | public ComparisonInfo() { |
64 | 0 | } |
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
|
70 | |
|
71 | 0 | public ComparisonInfo(Comparison comparison) { |
72 | 0 | this.fieldKey = comparison.getFieldKey(); |
73 | 0 | this.operator = comparison.getOperator(); |
74 | |
|
75 | 0 | if (comparison.getValues() != null) { |
76 | 0 | this.values = Collections.unmodifiableList(comparison.getValues()); |
77 | |
} |
78 | |
|
79 | 0 | this.isIgnoreCase = comparison.getIsIgnoreCase(); |
80 | 0 | } |
81 | |
|
82 | |
@Override |
83 | |
public String getFieldKey() { |
84 | 0 | return fieldKey; |
85 | |
} |
86 | |
|
87 | |
public void setFieldKey(String fieldKey) { |
88 | 0 | this.fieldKey = fieldKey; |
89 | 0 | } |
90 | |
|
91 | |
@Override |
92 | |
public String getOperator() { |
93 | 0 | return operator; |
94 | |
} |
95 | |
|
96 | |
public void setOperator(String operator) { |
97 | 0 | this.operator = operator; |
98 | 0 | } |
99 | |
|
100 | |
@Override |
101 | |
public List<String> getValues() { |
102 | 0 | return values; |
103 | |
} |
104 | |
|
105 | |
public void setValues(List<String> values) { |
106 | 0 | this.values = new ArrayList<String>(values); |
107 | 0 | } |
108 | |
|
109 | |
@Override |
110 | |
public Boolean getIsIgnoreCase() { |
111 | 0 | return this.isIgnoreCase; |
112 | |
} |
113 | |
|
114 | |
public void setIgnoreCase(Boolean ignoreCase) { |
115 | 0 | this.isIgnoreCase = ignoreCase; |
116 | 0 | } |
117 | |
} |