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
33
34 @XmlAccessorType(XmlAccessType.FIELD)
35 @XmlType(name = "ComparisonInfo", propOrder = {
36 "fieldKey", "operator", "values", "isIgnoreCase" , "_futureElements" })
37
38 public class ComparisonInfo
39 implements Comparison, Serializable {
40
41 private static final long serialVersionUID = 1L;
42
43 @XmlElement
44 private String fieldKey;
45
46 @XmlElement
47 private String operator;
48
49 @XmlElement
50 private List<String> values;
51
52 @XmlElement
53 private boolean isIgnoreCase;
54
55
56 @XmlAnyElement
57 private List<Object> _futureElements;
58
59
60
61
62
63 public ComparisonInfo() {
64 }
65
66
67
68
69
70
71 public ComparisonInfo(Comparison comparison) {
72 this.fieldKey = comparison.getFieldKey();
73 this.operator = comparison.getOperator();
74
75 if (comparison.getValues() != null) {
76 this.values = Collections.unmodifiableList(comparison.getValues());
77 }
78
79 this.isIgnoreCase = comparison.getIsIgnoreCase();
80 }
81
82 @Override
83 public String getFieldKey() {
84 return fieldKey;
85 }
86
87 public void setFieldKey(String fieldKey) {
88 this.fieldKey = fieldKey;
89 }
90
91 @Override
92 public String getOperator() {
93 return operator;
94 }
95
96 public void setOperator(String operator) {
97 this.operator = operator;
98 }
99
100 @Override
101 public List<String> getValues() {
102 return values;
103 }
104
105 public void setValues(List<String> values) {
106 this.values = new ArrayList<String>(values);
107 }
108
109 @Override
110 public Boolean getIsIgnoreCase() {
111 return this.isIgnoreCase;
112 }
113
114 public void setIgnoreCase(Boolean ignoreCase) {
115 this.isIgnoreCase = ignoreCase;
116 }
117 }