1 | |
package org.kuali.student.enrollment.lpr.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.lpr.infc.LprTransactionItem; |
14 | |
import org.kuali.student.enrollment.lpr.infc.LprTransactionItemRequestOption; |
15 | |
import org.kuali.student.enrollment.lpr.infc.LprTransactionItemResult; |
16 | |
import org.kuali.student.r2.common.dto.IdEntityInfo; |
17 | |
import org.w3c.dom.Element; |
18 | |
|
19 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
20 | |
@XmlType(name = "LprTransactionItemInfo", propOrder = {"id", |
21 | |
"personId", |
22 | |
"transactionId", |
23 | |
"newLuiId", |
24 | |
"existingLuiId", |
25 | |
"resultValuesGroupKeys", |
26 | |
"requestOptions", |
27 | |
"lprTransactionItemResult", |
28 | |
"name", |
29 | |
"descr", |
30 | |
"typeKey", |
31 | |
"stateKey", |
32 | |
"meta", |
33 | |
"attributes", |
34 | |
"_futureElements"}) |
35 | |
public class LprTransactionItemInfo extends IdEntityInfo implements LprTransactionItem, Serializable { |
36 | |
|
37 | |
private static final long serialVersionUID = 1L; |
38 | |
@XmlElement |
39 | |
private String personId; |
40 | |
@XmlElement |
41 | |
private String transactionId; |
42 | |
@XmlElement |
43 | |
private String newLuiId; |
44 | |
@XmlElement |
45 | |
private String existingLuiId; |
46 | |
@XmlElement |
47 | |
private List<String> resultValuesGroupKeys; |
48 | |
@XmlElement |
49 | |
private List<LprTransactionItemRequestOptionInfo> requestOptions; |
50 | |
@XmlElement |
51 | |
private LprTransactionItemResultInfo lprTransactionItemResult; |
52 | |
@XmlAnyElement |
53 | |
private List<Element> _futureElements; |
54 | |
|
55 | |
public LprTransactionItemInfo() { |
56 | 0 | super(); |
57 | 0 | } |
58 | |
|
59 | |
public LprTransactionItemInfo(LprTransactionItem lprTransactionItem) { |
60 | |
|
61 | 0 | super(lprTransactionItem); |
62 | 0 | if (null != lprTransactionItem) { |
63 | 0 | this.personId = lprTransactionItem.getPersonId(); |
64 | 0 | this.transactionId = lprTransactionItem.getTransactionId(); |
65 | 0 | this.newLuiId = lprTransactionItem.getNewLuiId(); |
66 | 0 | this.existingLuiId = lprTransactionItem.getExistingLuiId(); |
67 | |
|
68 | 0 | this.requestOptions = new ArrayList<LprTransactionItemRequestOptionInfo>(); |
69 | 0 | if (null != lprTransactionItem.getRequestOptions()) { |
70 | 0 | for (LprTransactionItemRequestOption reqOp : lprTransactionItem.getRequestOptions()) { |
71 | 0 | this.requestOptions.add(new LprTransactionItemRequestOptionInfo(reqOp)); |
72 | |
} |
73 | |
} |
74 | |
|
75 | 0 | this.resultValuesGroupKeys = new ArrayList<String>(); |
76 | 0 | if (null != lprTransactionItem.getResultValuesGroupKeys()) { |
77 | 0 | resultValuesGroupKeys.addAll(lprTransactionItem.getResultValuesGroupKeys()); |
78 | |
} |
79 | 0 | LprTransactionItemResult result = lprTransactionItem.getLprTransactionItemResult(); |
80 | 0 | if (result != null) { |
81 | |
|
82 | 0 | this.lprTransactionItemResult = new LprTransactionItemResultInfo(result); |
83 | |
} |
84 | |
|
85 | 0 | this._futureElements = null; |
86 | |
} |
87 | 0 | } |
88 | |
|
89 | |
@Override |
90 | |
public LprTransactionItemResultInfo getLprTransactionItemResult() { |
91 | 0 | return lprTransactionItemResult; |
92 | |
} |
93 | |
|
94 | |
public void setLprTransactionResult(LprTransactionItemResultInfo lprTransactionResult) { |
95 | 0 | this.lprTransactionItemResult = lprTransactionResult; |
96 | 0 | } |
97 | |
|
98 | |
@Override |
99 | |
public List<LprTransactionItemRequestOptionInfo> getRequestOptions() { |
100 | 0 | if (requestOptions == null) { |
101 | 0 | requestOptions = new ArrayList<LprTransactionItemRequestOptionInfo> (); |
102 | |
} |
103 | 0 | return requestOptions; |
104 | |
} |
105 | |
|
106 | |
public void setRequestOptions(List<LprTransactionItemRequestOptionInfo> requestOptions) { |
107 | 0 | this.requestOptions = requestOptions; |
108 | 0 | } |
109 | |
|
110 | |
public void setNewLuiId(String newLuiId) { |
111 | 0 | this.newLuiId = newLuiId; |
112 | 0 | } |
113 | |
|
114 | |
public void setExistingLuiId(String existingLuiId) { |
115 | 0 | this.existingLuiId = existingLuiId; |
116 | 0 | } |
117 | |
|
118 | |
@Override |
119 | |
public String getNewLuiId() { |
120 | 0 | return newLuiId; |
121 | |
} |
122 | |
|
123 | |
@Override |
124 | |
public String getExistingLuiId() { |
125 | 0 | return existingLuiId; |
126 | |
} |
127 | |
|
128 | |
@Override |
129 | |
public String getPersonId() { |
130 | 0 | return personId; |
131 | |
} |
132 | |
|
133 | |
public void setPersonId(String personId) { |
134 | 0 | this.personId = personId; |
135 | 0 | } |
136 | |
|
137 | |
@Override |
138 | |
public String getTransactionId() { |
139 | 0 | return transactionId; |
140 | |
} |
141 | |
|
142 | |
public void setTransactionId(String transactionId) { |
143 | 0 | this.transactionId = transactionId; |
144 | 0 | } |
145 | |
|
146 | |
@Override |
147 | |
public List<String> getResultValuesGroupKeys() { |
148 | 0 | if (this.resultValuesGroupKeys == null) { |
149 | 0 | this.resultValuesGroupKeys = new ArrayList<String> (); |
150 | |
} |
151 | 0 | return resultValuesGroupKeys; |
152 | |
} |
153 | |
|
154 | |
public void setResultValuesGroupKeys(List<String> resultValuesGroupKeys) { |
155 | 0 | this.resultValuesGroupKeys = resultValuesGroupKeys; |
156 | 0 | } |
157 | |
|
158 | |
public void setLprTransactionItemResult(LprTransactionItemResultInfo lprTransactionItemResult) { |
159 | 0 | this.lprTransactionItemResult = lprTransactionItemResult; |
160 | 0 | } |
161 | |
|
162 | |
@Override |
163 | |
public String toString() { |
164 | 0 | StringBuilder builder = new StringBuilder(); |
165 | 0 | builder.append("LprTransactionItemInfo [id="); |
166 | 0 | builder.append(getId()); |
167 | 0 | builder.append(", type="); |
168 | 0 | builder.append(getTypeKey()); |
169 | 0 | builder.append(", state="); |
170 | 0 | builder.append(getStateKey()); |
171 | 0 | builder.append(", personId="); |
172 | 0 | builder.append(personId); |
173 | 0 | builder.append(", transactionId="); |
174 | 0 | builder.append(transactionId); |
175 | 0 | builder.append(", newLuiId="); |
176 | 0 | builder.append(newLuiId); |
177 | 0 | builder.append(", existingLuiId="); |
178 | 0 | builder.append(existingLuiId); |
179 | 0 | builder.append("]"); |
180 | 0 | return builder.toString(); |
181 | |
} |
182 | |
|
183 | |
|
184 | |
} |