1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
package org.kuali.student.contract.model.test.source; |
18 |
|
|
19 |
|
import java.io.Serializable; |
20 |
|
import java.util.ArrayList; |
21 |
|
import java.util.Arrays; |
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.XmlAttribute; |
28 |
|
import javax.xml.bind.annotation.XmlElement; |
29 |
|
import javax.xml.bind.annotation.XmlElementWrapper; |
30 |
|
import javax.xml.bind.annotation.XmlType; |
31 |
|
|
32 |
|
import org.kuali.student.contract.model.test.source.ModelBuilder; |
33 |
|
import org.kuali.student.contract.model.test.source.SearchParam; |
34 |
|
import org.w3c.dom.Element; |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
@author |
42 |
|
|
43 |
|
@XmlAccessorType(XmlAccessType.FIELD) |
44 |
|
@XmlType(name = "SearchParamInfo", propOrder = {"key", "values", "_futureElements"}) |
|
|
| 0% |
Uncovered Elements: 16 (16) |
Complexity: 5 |
Complexity Density: 0.5 |
|
45 |
|
public class SearchParamInfo implements SearchParam, Serializable { |
46 |
|
|
47 |
|
private static final long serialVersionUID = 1L; |
48 |
|
@XmlAttribute |
49 |
|
private final String key; |
50 |
|
@XmlElementWrapper(name="values") |
51 |
|
@XmlElement(name="value") |
52 |
|
private final List<String> values; |
53 |
|
@XmlAnyElement |
54 |
|
private final List<Element> _futureElements; |
55 |
|
|
56 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
57 |
0
|
public SearchParamInfo() {... |
58 |
0
|
this.key = null; |
59 |
0
|
this.values = null; |
60 |
0
|
this._futureElements = null; |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
63 |
0
|
public SearchParamInfo(SearchParam infc) {... |
64 |
0
|
this.key = infc.getKey(); |
65 |
0
|
if (this.values == null) { |
66 |
0
|
this.values = null; |
67 |
|
} else { |
68 |
0
|
this.values = new ArrayList(infc.getValues()); |
69 |
|
} |
70 |
0
|
this._futureElements = null; |
71 |
|
} |
72 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
73 |
0
|
@Override... |
74 |
|
public List<String> getValues() { |
75 |
0
|
return values; |
76 |
|
} |
77 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
78 |
0
|
@Override... |
79 |
|
public String getKey() { |
80 |
0
|
return key; |
81 |
|
} |
82 |
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 8 |
Complexity Density: 0.89 |
|
83 |
|
public static class Builder implements ModelBuilder<SearchParamInfo>, SearchParam { |
84 |
|
|
85 |
|
private String key; |
86 |
|
private List<String> values; |
87 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
88 |
0
|
public Builder() {}... |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
90 |
0
|
public Builder(SearchParam searchInfo) {... |
91 |
0
|
this.key = searchInfo.getKey(); |
92 |
0
|
this.values = searchInfo.getValues(); |
93 |
|
} |
94 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
95 |
0
|
public SearchParamInfo build () {... |
96 |
0
|
return new SearchParamInfo (this); |
97 |
|
} |
98 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
99 |
0
|
public String getKey() {... |
100 |
0
|
return key; |
101 |
|
} |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
103 |
0
|
public void setKey(String key) {... |
104 |
0
|
this.key = key; |
105 |
|
} |
106 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
107 |
0
|
public List<String> getValues() {... |
108 |
0
|
return values; |
109 |
|
} |
110 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
111 |
0
|
public void setValues(List<String> values) {... |
112 |
0
|
this.values = values; |
113 |
|
} |
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
@param |
119 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
120 |
0
|
public Builder value(String value) {... |
121 |
0
|
this.values = Arrays.asList(value); |
122 |
0
|
return this; |
123 |
|
} |
124 |
|
} |
125 |
|
} |