Clover Coverage Report - KS Contract Documentation Generator 0.0.1-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
20   122   12   1.82
2   80   0.6   5.5
11     1.09  
2    
 
  CriteriaInfo       Line # 45 13 0% 5 19 0% 0.0
  CriteriaInfo.Builder       Line # 87 7 0% 7 14 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.contract.model.test.source;
17   
18    import java.io.Serializable;
19    import java.util.ArrayList;
20    import java.util.Collections;
21    import java.util.List;
22   
23    import javax.xml.bind.annotation.XmlAccessType;
24    import javax.xml.bind.annotation.XmlAccessorType;
25    import javax.xml.bind.annotation.XmlAnyElement;
26    import javax.xml.bind.annotation.XmlElement;
27    import javax.xml.bind.annotation.XmlElementWrapper;
28    import javax.xml.bind.annotation.XmlType;
29   
30    import org.kuali.student.contract.model.test.source.Comparison;
31    import org.kuali.student.contract.model.test.source.Criteria;
32    import org.kuali.student.contract.model.test.source.ModelBuilder;
33    import org.w3c.dom.Element;
34   
35    /**
36    * Query to return some information regarding LUI to person relationships.
37    *
38    * @Author KSContractMojo
39    * @Author Kamal
40    * @Since Tue Mar 01 15:54:06 PST 2011
41    * @See <a href="https://wiki.kuali.org/display/KULSTU/luiPersonRelationCriteria+Structure">LuiPersonRelationCriteria</a>
42    */
43    @XmlAccessorType(XmlAccessType.FIELD)
44    @XmlType(name = "CriteriaInfo", propOrder = {"comparisons", "maxResults", "_futureElements"})
 
45    public class CriteriaInfo implements Criteria, Serializable {
46   
47    private static final long serialVersionUID = 1L;
48   
49    @XmlElementWrapper(name="comparisons")
50    @XmlElement(name="comparison")
51    private final List<ComparisonInfo> comparisons;
52    @XmlElement
53    private final Integer maxResults;
54    @XmlAnyElement
55    private final List<Element> _futureElements;
56   
 
57  0 toggle private CriteriaInfo() {
58  0 comparisons = null;
59  0 maxResults = null;
60  0 _futureElements = null;
61    }
62   
 
63  0 toggle @Override
64    public List<ComparisonInfo> getComparisons() {
65  0 return this.comparisons;
66    }
67   
 
68  0 toggle @Override
69    public Integer getMaxResults() {
70  0 return this.maxResults;
71    }
72   
 
73  0 toggle private CriteriaInfo(Criteria builder) {
74  0 if (builder.getComparisons() == null) {
75  0 this.comparisons = null;
76    } else {
77  0 List<ComparisonInfo> list = new ArrayList(builder.getComparisons().size());
78  0 for (Comparison infc : builder.getComparisons()) {
79  0 list.add(new ComparisonInfo.Builder(infc).build());
80    }
81  0 this.comparisons = Collections.unmodifiableList(list);
82    }
83  0 this.maxResults = builder.getMaxResults();
84  0 this._futureElements = null;
85    }
86   
 
87    public static class Builder implements ModelBuilder<CriteriaInfo>, Criteria {
88   
89    private List<? extends Comparison> comparisons;
90    private Integer maxResults;
91   
 
92  0 toggle public Builder() {
93    }
94   
 
95  0 toggle public Builder(Criteria info) {
96  0 this.comparisons = info.getComparisons();
97  0 this.maxResults = info.getMaxResults();
98    }
99   
 
100  0 toggle public CriteriaInfo build() {
101  0 return new CriteriaInfo(this);
102    }
103   
 
104  0 toggle @Override
105    public List<? extends Comparison> getComparisons() {
106  0 return this.comparisons;
107    }
108   
 
109  0 toggle @Override
110    public Integer getMaxResults() {
111  0 return this.maxResults;
112    }
113   
 
114  0 toggle public void setComparisons(List<? extends Comparison> comparisons) {
115  0 this.comparisons = comparisons;
116    }
117   
 
118  0 toggle public void setMaxResults(Integer maxResults) {
119  0 this.maxResults = maxResults;
120    }
121    }
122    }