1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.lum.lu.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.common.dto.SearchParamInfo; |
19 | |
import org.kuali.student.r2.common.infc.SearchParam; |
20 | |
import org.kuali.student.r2.lum.lu.infc.MembershipQuery; |
21 | |
|
22 | |
import javax.xml.bind.Element; |
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.XmlAttribute; |
27 | |
import javax.xml.bind.annotation.XmlElement; |
28 | |
import javax.xml.bind.annotation.XmlType; |
29 | |
import java.io.Serializable; |
30 | |
import java.util.ArrayList; |
31 | |
import java.util.List; |
32 | |
|
33 | |
@XmlAccessorType(XmlAccessType.FIELD) |
34 | |
@XmlType(name = "MembershipQueryInfo", propOrder = {"id", "searchTypeKey", "queryParamValueList", "_futureElements"}) |
35 | |
public class MembershipQueryInfo implements Serializable, MembershipQuery { |
36 | |
|
37 | |
private static final long serialVersionUID = 1L; |
38 | |
|
39 | |
@XmlAttribute |
40 | |
private String id; |
41 | |
|
42 | |
@XmlElement |
43 | |
private String searchTypeKey; |
44 | |
|
45 | |
@XmlElement |
46 | |
private List<SearchParamInfo> queryParamValueList; |
47 | |
|
48 | |
@XmlAnyElement |
49 | |
private List<Element> _futureElements; |
50 | |
|
51 | 0 | public MembershipQueryInfo() { |
52 | |
|
53 | 0 | } |
54 | |
|
55 | 0 | public MembershipQueryInfo(MembershipQuery membershipQuery) { |
56 | 0 | if (null != membershipQuery) { |
57 | 0 | this.id = membershipQuery.getId(); |
58 | 0 | this.searchTypeKey = membershipQuery.getSearchTypeKey(); |
59 | 0 | this.queryParamValueList = new ArrayList<SearchParamInfo>(); |
60 | 0 | for (SearchParam searchParam : membershipQuery.getQueryParamValueList()) { |
61 | |
|
62 | |
|
63 | 0 | throw new RuntimeException("Insert new SearchParam"); |
64 | |
} |
65 | |
} |
66 | 0 | } |
67 | |
|
68 | |
@Override |
69 | |
public String getId() { |
70 | 0 | return id; |
71 | |
} |
72 | |
|
73 | |
public void setId(String id) { |
74 | 0 | this.id = id; |
75 | 0 | } |
76 | |
|
77 | |
@Override |
78 | |
public String getSearchTypeKey() { |
79 | 0 | return searchTypeKey; |
80 | |
} |
81 | |
|
82 | |
public void setSearchTypeKey(String searchTypeKey) { |
83 | 0 | this.searchTypeKey = searchTypeKey; |
84 | 0 | } |
85 | |
|
86 | |
@Override |
87 | |
public List<SearchParamInfo> getQueryParamValueList() { |
88 | 0 | if (queryParamValueList == null) { |
89 | 0 | queryParamValueList = new ArrayList<SearchParamInfo>(0); |
90 | |
} |
91 | 0 | return queryParamValueList; |
92 | |
} |
93 | |
|
94 | |
public void setQueryParamValueList(List<SearchParamInfo> queryParamValueList) { |
95 | 0 | this.queryParamValueList = queryParamValueList; |
96 | 0 | } |
97 | |
} |