1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
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 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
@XmlAccessorType(XmlAccessType.FIELD) |
44 |
|
@XmlType(name = "CriteriaInfo", propOrder = {"comparisons", "maxResults", "_futureElements"}) |
|
|
| 0% |
Uncovered Elements: 19 (19) |
Complexity: 5 |
Complexity Density: 0.38 |
|
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 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
57 |
0
|
private CriteriaInfo() {... |
58 |
0
|
comparisons = null; |
59 |
0
|
maxResults = null; |
60 |
0
|
_futureElements = null; |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
@Override... |
64 |
|
public List<ComparisonInfo> getComparisons() { |
65 |
0
|
return this.comparisons; |
66 |
|
} |
67 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
0
|
@Override... |
69 |
|
public Integer getMaxResults() { |
70 |
0
|
return this.maxResults; |
71 |
|
} |
72 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 2 |
Complexity Density: 0.25 |
|
73 |
0
|
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 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 7 |
Complexity Density: 1 |
|
87 |
|
public static class Builder implements ModelBuilder<CriteriaInfo>, Criteria { |
88 |
|
|
89 |
|
private List<? extends Comparison> comparisons; |
90 |
|
private Integer maxResults; |
91 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
92 |
0
|
public Builder() {... |
93 |
|
} |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
95 |
0
|
public Builder(Criteria info) {... |
96 |
0
|
this.comparisons = info.getComparisons(); |
97 |
0
|
this.maxResults = info.getMaxResults(); |
98 |
|
} |
99 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
0
|
public CriteriaInfo build() {... |
101 |
0
|
return new CriteriaInfo(this); |
102 |
|
} |
103 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
104 |
0
|
@Override... |
105 |
|
public List<? extends Comparison> getComparisons() { |
106 |
0
|
return this.comparisons; |
107 |
|
} |
108 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
109 |
0
|
@Override... |
110 |
|
public Integer getMaxResults() { |
111 |
0
|
return this.maxResults; |
112 |
|
} |
113 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
114 |
0
|
public void setComparisons(List<? extends Comparison> comparisons) {... |
115 |
0
|
this.comparisons = comparisons; |
116 |
|
} |
117 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
118 |
0
|
public void setMaxResults(Integer maxResults) {... |
119 |
0
|
this.maxResults = maxResults; |
120 |
|
} |
121 |
|
} |
122 |
|
} |