1 | |
package org.kuali.student.enrollment.courseregistration.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.courseregistration.infc.RegRequest; |
14 | |
import org.kuali.student.enrollment.courseregistration.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", "termId", |
20 | |
"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 | |
|
27 | |
@XmlElement |
28 | |
private String termId; |
29 | |
@XmlElement |
30 | |
private List<RegRequestItemInfo> regRequestItems; |
31 | |
@XmlAnyElement |
32 | |
private List<Element> _futureElements; |
33 | |
|
34 | |
public RegRequestInfo() { |
35 | 0 | super(); |
36 | 0 | this.requestorId = null; |
37 | 0 | this.termId = null; |
38 | 0 | this.regRequestItems = new ArrayList<RegRequestItemInfo>(); |
39 | 0 | this._futureElements = null; |
40 | |
|
41 | 0 | } |
42 | |
|
43 | |
public RegRequestInfo(RegRequest regRequest) { |
44 | 0 | super(regRequest); |
45 | 0 | if (null != regRequest) { |
46 | 0 | this.requestorId = regRequest.getRequestorId(); |
47 | 0 | this.termId = regRequest.getTermId(); |
48 | 0 | this.regRequestItems = new ArrayList<RegRequestItemInfo>(); |
49 | 0 | if (regRequest.getRegRequestItems() != null) { |
50 | 0 | for (RegRequestItem regRequestItem : regRequest.getRegRequestItems()) { |
51 | 0 | this.regRequestItems.add(new RegRequestItemInfo(regRequestItem)); |
52 | |
} |
53 | |
} |
54 | |
|
55 | 0 | this._futureElements = null; |
56 | |
} |
57 | |
|
58 | 0 | } |
59 | |
|
60 | |
public void setRequestorId(String requestorId) { |
61 | 0 | this.requestorId = requestorId; |
62 | 0 | } |
63 | |
|
64 | |
public void setTermId(String termId) { |
65 | 0 | this.termId = termId; |
66 | 0 | } |
67 | |
|
68 | |
public void setRegRequestItems(List<RegRequestItemInfo> regRequestItems) { |
69 | 0 | this.regRequestItems = regRequestItems; |
70 | 0 | } |
71 | |
|
72 | |
@Override |
73 | |
public String getRequestorId() { |
74 | 0 | return requestorId; |
75 | |
} |
76 | |
|
77 | |
@Override |
78 | |
public String getTermId() { |
79 | |
|
80 | 0 | return termId; |
81 | |
} |
82 | |
|
83 | |
@Override |
84 | |
public List<RegRequestItemInfo> getRegRequestItems() { |
85 | 0 | return regRequestItems; |
86 | |
} |
87 | |
|
88 | |
} |