1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.enrollment.lui.dto; |
18 | |
|
19 | |
import java.io.Serializable; |
20 | |
import java.util.Date; |
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.common.dto.HasAttributesAndMetaInfo; |
30 | |
import org.kuali.student.common.dto.IdEntityInfo; |
31 | |
import org.kuali.student.common.infc.ModelBuilder; |
32 | |
import org.kuali.student.enrollment.lui.infc.Lui; |
33 | |
import org.w3c.dom.Element; |
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
@XmlAccessorType(XmlAccessType.FIELD) |
41 | |
@XmlType(name = "LuiInfo", propOrder = {"id","typeKey","stateKey","luiCode", "cluId", "atpKey", "maxSeats", "effectiveDate", "expriationDate","metaInfo","attributes", "_futureElements"}) |
42 | 0 | public class LuiInfo extends IdEntityInfo |
43 | |
implements Serializable, Lui { |
44 | |
|
45 | |
private static final long serialVersionUID = 1L; |
46 | |
|
47 | |
@XmlElement |
48 | |
private final String luiCode; |
49 | |
|
50 | |
@XmlElement |
51 | |
private final String cluId; |
52 | |
|
53 | |
@XmlElement |
54 | |
private final String atpKey; |
55 | |
|
56 | |
@XmlElement |
57 | |
private final Integer maxSeats; |
58 | |
|
59 | |
@XmlElement |
60 | |
private final Date effectiveDate; |
61 | |
|
62 | |
@XmlElement |
63 | |
private final Date expirationDate; |
64 | |
|
65 | |
@XmlAnyElement |
66 | |
private final List<Element> _futureElements; |
67 | |
|
68 | 0 | private LuiInfo() { |
69 | 0 | luiCode = null; |
70 | 0 | cluId = null; |
71 | 0 | atpKey = null; |
72 | 0 | maxSeats = null; |
73 | 0 | effectiveDate = null; |
74 | 0 | expirationDate = null; |
75 | 0 | _futureElements = null; |
76 | 0 | } |
77 | |
|
78 | |
private LuiInfo(Lui builder) { |
79 | 0 | super(builder); |
80 | 0 | this.luiCode = builder.getLuiCode(); |
81 | 0 | this.cluId = builder.getCluId(); |
82 | 0 | this.atpKey = builder.getAtpKey(); |
83 | 0 | this.maxSeats =builder.getMaxSeats(); |
84 | 0 | this.effectiveDate = null != builder.getEffectiveDate()? new Date(builder.getEffectiveDate().getTime()) : null; |
85 | 0 | this.expirationDate = null != builder.getExpirationDate()? new Date(builder.getExpirationDate().getTime()) : null; |
86 | 0 | this._futureElements = null; |
87 | 0 | } |
88 | |
|
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
@Override |
94 | |
public String getLuiCode() { |
95 | 0 | return luiCode; |
96 | |
} |
97 | |
|
98 | |
|
99 | |
|
100 | |
|
101 | |
@Override |
102 | |
public String getCluId() { |
103 | 0 | return cluId; |
104 | |
} |
105 | |
|
106 | |
|
107 | |
|
108 | |
|
109 | |
@Override |
110 | |
public String getAtpKey() { |
111 | 0 | return atpKey; |
112 | |
} |
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | |
@Override |
118 | |
public Integer getMaxSeats() { |
119 | 0 | return maxSeats; |
120 | |
} |
121 | |
|
122 | |
|
123 | |
|
124 | |
|
125 | |
|
126 | |
|
127 | |
|
128 | |
@Override |
129 | |
public Date getEffectiveDate() { |
130 | 0 | return effectiveDate; |
131 | |
} |
132 | |
|
133 | |
|
134 | |
|
135 | |
|
136 | |
|
137 | |
|
138 | |
|
139 | |
|
140 | |
|
141 | |
@Override |
142 | |
public Date getExpirationDate() { |
143 | 0 | return expirationDate; |
144 | |
} |
145 | |
|
146 | |
|
147 | |
|
148 | 0 | public static class Builder extends IdEntityInfo.Builder implements ModelBuilder<LuiInfo>, Lui { |
149 | |
|
150 | |
private String luiCode; |
151 | |
private String cluId; |
152 | |
private String atpKey; |
153 | |
private Integer maxSeats; |
154 | |
private Date effectiveDate; |
155 | |
private Date expirationDate; |
156 | |
|
157 | 0 | public Builder() {} |
158 | |
|
159 | |
public Builder(Lui luiInfo) { |
160 | 0 | super(luiInfo); |
161 | 0 | this.luiCode = luiInfo.getLuiCode(); |
162 | 0 | this.cluId = luiInfo.getCluId(); |
163 | 0 | this.atpKey = luiInfo.getAtpKey(); |
164 | 0 | this.maxSeats = luiInfo.getMaxSeats(); |
165 | 0 | this.effectiveDate = luiInfo.getEffectiveDate(); |
166 | 0 | this.expirationDate = luiInfo.getExpirationDate(); |
167 | 0 | } |
168 | |
|
169 | |
@Override |
170 | |
public LuiInfo build() { |
171 | 0 | return new LuiInfo(this); |
172 | |
} |
173 | |
|
174 | |
@Override |
175 | |
public String getLuiCode() { |
176 | 0 | return luiCode; |
177 | |
} |
178 | |
|
179 | |
public void setLuiCode(String luiCode) { |
180 | 0 | this.luiCode = luiCode; |
181 | 0 | } |
182 | |
|
183 | |
@Override |
184 | |
public String getCluId() { |
185 | 0 | return cluId; |
186 | |
} |
187 | |
|
188 | |
public void setCluId(String cluId) { |
189 | 0 | this.cluId = cluId; |
190 | 0 | } |
191 | |
|
192 | |
@Override |
193 | |
public String getAtpKey() { |
194 | 0 | return atpKey; |
195 | |
} |
196 | |
|
197 | |
public void setAtpKey(String atpKey) { |
198 | 0 | this.atpKey = atpKey; |
199 | 0 | } |
200 | |
|
201 | |
@Override |
202 | |
public Integer getMaxSeats() { |
203 | 0 | return maxSeats; |
204 | |
} |
205 | |
|
206 | |
public void setMaxSeats(Integer maxSeats) { |
207 | 0 | this.maxSeats = maxSeats; |
208 | 0 | } |
209 | |
|
210 | |
@Override |
211 | |
public Date getEffectiveDate() { |
212 | 0 | return effectiveDate; |
213 | |
} |
214 | |
|
215 | |
public void setEffectiveDate(Date effectiveDate) { |
216 | 0 | this.effectiveDate = effectiveDate; |
217 | 0 | } |
218 | |
|
219 | |
@Override |
220 | |
public Date getExpirationDate() { |
221 | 0 | return expirationDate; |
222 | |
} |
223 | |
|
224 | |
public void setExpirationDate(Date expirationDate) { |
225 | 0 | this.expirationDate = expirationDate; |
226 | 0 | } |
227 | |
} |
228 | |
} |