1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.core.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) |
26 | 0 | public class SearchParam implements Serializable { |
27 | |
private static final long serialVersionUID = 1L; |
28 | |
@XmlElement |
29 | |
private String value; |
30 | |
@XmlElement |
31 | |
private List<String> listValue; |
32 | |
@XmlAttribute |
33 | |
private String key; |
34 | |
|
35 | |
public Object getValue() { |
36 | 0 | if (value != null) { |
37 | 0 | return value; |
38 | |
} else { |
39 | 0 | return listValue; |
40 | |
} |
41 | |
} |
42 | |
|
43 | |
public void setValue(String value) { |
44 | 0 | this.value = value; |
45 | 0 | listValue = null; |
46 | 0 | } |
47 | |
|
48 | |
public void setValue(List<String> listValue) { |
49 | 0 | this.listValue = listValue; |
50 | 0 | value = null; |
51 | 0 | } |
52 | |
|
53 | |
public String getKey() { |
54 | 0 | return key; |
55 | |
} |
56 | |
|
57 | |
public void setKey(String key) { |
58 | 0 | this.key = key; |
59 | 0 | } |
60 | |
|
61 | |
@Override |
62 | |
public String toString() { |
63 | 0 | return "SearchParam[key=" + key + ", value=" + value + ", listValue=" |
64 | |
+ listValue + "]"; |
65 | |
} |
66 | |
} |