1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.student.enrollment.courseregistration.dto;
18
19 import java.io.Serializable;
20 import java.util.ArrayList;
21 import java.util.List;
22
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.XmlElement;
27 import javax.xml.bind.annotation.XmlType;
28
29 import org.kuali.student.enrollment.courseregistration.infc.RegistrationRequest;
30 import org.kuali.student.enrollment.courseregistration.infc.RegistrationRequestItem;
31 import org.kuali.student.r2.common.dto.IdEntityInfo;
32 import org.w3c.dom.Element;
33
34 @XmlAccessorType(XmlAccessType.FIELD)
35 @XmlType(name = "RegistrationRequestInfo", propOrder = {
36 "id", "name", "descr", "typeKey", "stateKey",
37 "requestorId", "termId", "registrationRequestItems",
38 "meta", "attributes", "_futureElements"})
39
40 public class RegistrationRequestInfo
41 extends IdEntityInfo
42 implements RegistrationRequest, Serializable {
43
44 private static final long serialVersionUID = 1L;
45
46 @XmlElement
47 private String requestorId;
48
49 @XmlElement
50 private String termId;
51
52 @XmlElement
53 private List<RegistrationRequestItemInfo> registrationRequestItems;
54
55 @XmlAnyElement
56 private List<Element> _futureElements;
57
58
59
60
61
62 public RegistrationRequestInfo() {
63 }
64
65
66
67
68
69
70
71 public RegistrationRequestInfo(RegistrationRequest registrationRequest) {
72 super(registrationRequest);
73
74 if (registrationRequest != null) {
75 this.requestorId = registrationRequest.getRequestorId();
76 this.termId = registrationRequest.getTermId();
77 this.registrationRequestItems = new ArrayList<RegistrationRequestItemInfo>();
78
79 for (RegistrationRequestItem registrationRequestItem : registrationRequest.getRegistrationRequestItems()) {
80 this.registrationRequestItems.add(new RegistrationRequestItemInfo(registrationRequestItem));
81 }
82 }
83 }
84
85 @Override
86 public String getRequestorId() {
87 return requestorId;
88 }
89
90 public void setRequestorId(String requestorId) {
91 this.requestorId = requestorId;
92 }
93
94 @Override
95 public String getTermId() {
96 return termId;
97 }
98
99 public void setTermId(String termId) {
100 this.termId = termId;
101 }
102
103 @Override
104 public List<RegistrationRequestItemInfo> getRegistrationRequestItems() {
105 if (this.registrationRequestItems == null) {
106 this.registrationRequestItems = new ArrayList<RegistrationRequestItemInfo>();
107 }
108
109 return registrationRequestItems;
110 }
111
112 public void setRegistrationRequestItems(List<RegistrationRequestItemInfo> registrationRequestItems) {
113 this.registrationRequestItems = registrationRequestItems;
114 }
115 }