1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.search.dto; |
17 |
|
|
18 |
|
import java.io.Serializable; |
19 |
|
import java.util.List; |
20 |
|
|
21 |
|
import javax.xml.bind.annotation.XmlAccessType; |
22 |
|
import javax.xml.bind.annotation.XmlAccessorType; |
23 |
|
import javax.xml.bind.annotation.XmlAttribute; |
24 |
|
import javax.xml.bind.annotation.XmlElement; |
25 |
|
@XmlAccessorType(XmlAccessType.FIELD) |
|
|
| 10.3% |
Uncovered Elements: 61 (68) |
Complexity: 24 |
Complexity Density: 0.73 |
|
26 |
|
public class SearchParam implements Serializable { |
27 |
|
|
28 |
|
private static final long serialVersionUID = 1L; |
29 |
|
@XmlElement |
30 |
|
private String value; |
31 |
|
@XmlElement |
32 |
|
private List<String> listValue; |
33 |
|
@XmlAttribute |
34 |
|
private String key; |
35 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
36 |
8
|
public SearchParam(){... |
37 |
8
|
super(); |
38 |
|
} |
39 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
40 |
0
|
public SearchParam(String key, String value) {... |
41 |
0
|
this(); |
42 |
0
|
this.key = key; |
43 |
0
|
this.value = value; |
44 |
|
} |
45 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
46 |
0
|
public SearchParam(String key, List<String> value) {... |
47 |
0
|
this(); |
48 |
0
|
this.key = key; |
49 |
0
|
this.listValue = value; |
50 |
|
} |
51 |
|
|
52 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
53 |
0
|
public Object getValue() {... |
54 |
0
|
if (value != null) { |
55 |
0
|
return value; |
56 |
|
} else { |
57 |
0
|
return listValue; |
58 |
|
} |
59 |
|
} |
60 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
61 |
8
|
public void setValue(String value) {... |
62 |
8
|
this.value = value; |
63 |
8
|
listValue = null; |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
66 |
0
|
public void setValue(List<String> listValue) {... |
67 |
0
|
this.listValue = listValue; |
68 |
0
|
value = null; |
69 |
|
} |
70 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
71 |
0
|
public String getKey() {... |
72 |
0
|
return key; |
73 |
|
} |
74 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
75 |
8
|
public void setKey(String key) {... |
76 |
8
|
this.key = key; |
77 |
|
} |
78 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
79 |
0
|
@Override... |
80 |
|
public String toString() { |
81 |
0
|
return "SearchParam[key=" + key + ", value=" + value + ", listValue=" |
82 |
|
+ listValue + "]"; |
83 |
|
} |
84 |
|
|
|
|
| 0% |
Uncovered Elements: 28 (28) |
Complexity: 10 |
Complexity Density: 0.83 |
|
85 |
0
|
@Override... |
86 |
|
public boolean equals(Object o) { |
87 |
0
|
if (this == o) return true; |
88 |
0
|
if (o == null || getClass() != o.getClass()) return false; |
89 |
|
|
90 |
0
|
SearchParam that = (SearchParam) o; |
91 |
|
|
92 |
0
|
if (key != null ? !key.equals(that.key) : that.key != null) return false; |
93 |
0
|
if (listValue != null ? !listValue.equals(that.listValue) : that.listValue != null) return false; |
94 |
0
|
if (value != null ? !value.equals(that.value) : that.value != null) return false; |
95 |
|
|
96 |
0
|
return true; |
97 |
|
} |
98 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 4 |
Complexity Density: 1 |
|
99 |
0
|
@Override... |
100 |
|
public int hashCode() { |
101 |
0
|
int result = value != null ? value.hashCode() : 0; |
102 |
0
|
result = 31 * result + (listValue != null ? listValue.hashCode() : 0); |
103 |
0
|
result = 31 * result + (key != null ? key.hashCode() : 0); |
104 |
0
|
return result; |
105 |
|
} |
106 |
|
} |