1 | |
package org.kuali.student.enrollment.registration.course.dto; |
2 | |
|
3 | |
import java.io.Serializable; |
4 | |
import java.util.ArrayList; |
5 | |
import java.util.List; |
6 | |
|
7 | |
import javax.xml.bind.annotation.XmlAccessType; |
8 | |
import javax.xml.bind.annotation.XmlAccessorType; |
9 | |
import javax.xml.bind.annotation.XmlAnyElement; |
10 | |
import javax.xml.bind.annotation.XmlElement; |
11 | |
import javax.xml.bind.annotation.XmlType; |
12 | |
|
13 | |
import org.kuali.student.enrollment.registration.course.infc.RegRequest; |
14 | |
import org.kuali.student.enrollment.registration.course.infc.RegRequestItem; |
15 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
16 | |
import org.w3c.dom.Element; |
17 | |
|
18 | |
@XmlAccessorType(XmlAccessType.FIELD) |
19 | |
@XmlType(name = "RegRequestInfo", propOrder = {"id", "name", "descr", "typeKey", "stateKey", "requestorId", |
20 | |
"studentId", "termKey", "regRequestItems", "meta", "attributes", "_futureElements"}) |
21 | |
public class RegRequestInfo extends IdEntityInfo implements RegRequest, Serializable { |
22 | |
|
23 | |
private static final long serialVersionUID = 1L; |
24 | |
@XmlElement |
25 | |
private String requestorId; |
26 | |
@XmlElement |
27 | |
private String studentId; |
28 | |
@XmlElement |
29 | |
private String termKey; |
30 | |
@XmlElement |
31 | |
private List<RegRequestItemInfo> regRequestItems; |
32 | |
@XmlAnyElement |
33 | |
private List<Element> _futureElements; |
34 | |
|
35 | |
public RegRequestInfo() { |
36 | 0 | super(); |
37 | 0 | this.requestorId = null; |
38 | 0 | this.studentId = null; |
39 | 0 | this.termKey = null; |
40 | 0 | this.regRequestItems = null; |
41 | 0 | this._futureElements = null; |
42 | |
|
43 | 0 | } |
44 | |
|
45 | |
public RegRequestInfo(RegRequest regRequest) { |
46 | 0 | super(regRequest); |
47 | 0 | if (null != regRequest) { |
48 | 0 | this.requestorId = regRequest.getRequestorId(); |
49 | 0 | this.studentId = regRequest.getStudentId(); |
50 | 0 | this.termKey = regRequest.getTermKey(); |
51 | 0 | this.regRequestItems = new ArrayList<RegRequestItemInfo>(); |
52 | 0 | if (regRequest.getRegRequestItems() != null) { |
53 | 0 | for (RegRequestItem regRequestItem : regRequest.getRegRequestItems()) { |
54 | 0 | this.regRequestItems.add(new RegRequestItemInfo(regRequestItem)); |
55 | |
} |
56 | |
} |
57 | |
|
58 | 0 | this._futureElements = null; |
59 | |
} |
60 | |
|
61 | 0 | } |
62 | |
|
63 | |
public void setRequestorId(String requestorId) { |
64 | 0 | this.requestorId = requestorId; |
65 | 0 | } |
66 | |
|
67 | |
public void setStudentId(String studentId) { |
68 | 0 | this.studentId = studentId; |
69 | 0 | } |
70 | |
|
71 | |
public void setTermKey(String termKey) { |
72 | 0 | this.termKey = termKey; |
73 | 0 | } |
74 | |
|
75 | |
public void setRegRequestItems(List<RegRequestItemInfo> regRequestItems) { |
76 | 0 | this.regRequestItems = regRequestItems; |
77 | 0 | } |
78 | |
|
79 | |
@Override |
80 | |
public String getRequestorId() { |
81 | 0 | return requestorId; |
82 | |
} |
83 | |
|
84 | |
@Override |
85 | |
public String getStudentId() { |
86 | 0 | return studentId; |
87 | |
} |
88 | |
|
89 | |
@Override |
90 | |
public String getTermKey() { |
91 | |
|
92 | 0 | return termKey; |
93 | |
} |
94 | |
|
95 | |
@Override |
96 | |
public List<RegRequestItemInfo> getRegRequestItems() { |
97 | 0 | return regRequestItems; |
98 | |
} |
99 | |
|
100 | |
} |