Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
../../../../../../img/srcFileCovDistChart0.png 2% of files have more coverage
32   167   20   1.78
4   118   0.62   9
18     1.11  
2    
Warning
  • The source file used to generate this report was changed after Clover generated coverage information. The coverage reported may not match the source lines. You should regenerate the coverage information and the report to ensure the files are in sync.
 
  ComparisonInfo       Line # 37 16 0% 7 24 0% 0.0
  ComparisonInfo.Builder       Line # 98 16 0% 13 30 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2009 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    * See the License for the specific language governing permissions and
14    * limitations under the License.
15    */
16    package org.kuali.student.r2.common.dto;
17   
18    import java.io.Serializable;
19    import java.util.ArrayList;
20    import java.util.Arrays;
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.kuali.student.r2.common.infc.ModelBuilder;
33    import org.w3c.dom.Element;
34   
35    @XmlAccessorType(XmlAccessType.FIELD)
36    @XmlType(name = "ComparisonInfo", propOrder = {"fieldKey", "operator", "values", "ignoreCase", "_futureElements"})
 
37    public class ComparisonInfo implements Comparison, Serializable {
38   
39    private static final long serialVersionUID = 1L;
40    @XmlElement
41    private final String fieldKey;
42   
43    @XmlElement
44    private final String operator;
45   
46    @XmlElementWrapper(name="values")
47    @XmlElement(name="value")
48    private final List<String> values;
49   
50    @XmlElement
51    private final boolean ignoreCase;
52   
53    @XmlAnyElement
54    private final List<Element> _futureElements;
55   
 
56  0 toggle private ComparisonInfo() {
57  0 this.fieldKey = null;
58  0 this.operator = null;
59  0 this.values = null;
60  0 this.ignoreCase = false;
61  0 this._futureElements = null;
62    }
63   
 
64  0 toggle private ComparisonInfo(Comparison bldr) {
65  0 this.fieldKey = bldr.getFieldKey();
66  0 this.operator = bldr.getOperator();
67  0 if (bldr.getValues() == null)
68    {
69  0 this.values = null;
70    }else
71    {
72  0 this.values = Collections.unmodifiableList(bldr.getValues());
73    }
74  0 this.ignoreCase = bldr.isIgnoreCase();
75  0 this._futureElements = null;
76    }
77   
 
78  0 toggle @Override
79    public String getFieldKey() {
80  0 return fieldKey;
81    }
82   
 
83  0 toggle @Override
84    public String getOperator() {
85  0 return operator;
86    }
87   
 
88  0 toggle @Override
89    public List<String> getValues() {
90  0 return values;
91    }
92   
 
93  0 toggle @Override
94    public boolean isIgnoreCase() {
95  0 return this.ignoreCase;
96    }
97   
 
98    public static class Builder implements ModelBuilder<ComparisonInfo>, Comparison {
99   
100    private String fieldKey;
101    private String operator;
102    private List<String> values;
103    private boolean ignoreCase;
104   
 
105  0 toggle public Builder() {
106    }
107   
 
108  0 toggle public Builder(Comparison infc) {
109  0 this.fieldKey = infc.getFieldKey();
110  0 this.operator = infc.getOperator();
111  0 if (infc.getValues() != null) {
112  0 this.values = new ArrayList<String>(infc.getValues());
113    }
114    }
115   
 
116  0 toggle public ComparisonInfo build() {
117  0 return new ComparisonInfo(this);
118    }
119   
 
120  0 toggle @Override
121    public String getFieldKey() {
122  0 return fieldKey;
123    }
124   
 
125  0 toggle @Override
126    public String getOperator() {
127  0 return operator;
128    }
129   
 
130  0 toggle @Override
131    public List<String> getValues() {
132  0 return values;
133    }
134   
 
135  0 toggle @Override
136    public boolean isIgnoreCase() {
137  0 return this.ignoreCase;
138    }
139   
 
140  0 toggle public Builder setFieldKey(String fieldKey) {
141  0 this.fieldKey = fieldKey;
142  0 return this;
143    }
144   
 
145  0 toggle public Builder setOperator(String operator) {
146  0 this.operator = operator;
147  0 return this;
148    }
149   
150    /**
151    * convenience method
152    * @param value
153    * @return
154    */
 
155  0 toggle public void setValue(String value) {
156  0 this.setValues(Arrays.asList(value));
157    }
158   
 
159  0 toggle public void setValues(List<String> values) {
160  0 this.values = values;
161    }
162   
 
163  0 toggle public void setIgnoreCase(boolean ignoreCase) {
164  0 this.ignoreCase = ignoreCase;
165    }
166    }
167    }