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