Clover Coverage Report - KS Enroll API 1.3.0-SNAPSHOT
Coverage timestamp: Tue Apr 19 2011 12:34:23 EST
../../../../../../img/srcFileCovDistChart0.png 45% of files have more coverage
42   229   25   1.83
4   141   0.6   11.5
23     1.09  
2    
 
  LuiInfo       Line # 42 22 0% 10 34 0% 0.0
  LuiInfo.Builder       Line # 149 20 0% 15 35 0% 0.0
 
No Tests
 
1    /**
2    * Copyright 2010 The Kuali Foundation
3    *
4    * Licensed under the the Educational Community License, Version 1.0
5    * (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl1.php
9    *
10    * Unless required by applicable law or agreed to in writing, software
11    * distributed under the License is distributed on an "AS IS" BASIS,
12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13    * implied. See the License for the specific language governing
14    * permissions and limitations under the License.
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.infc.ModelBuilder;
30    import org.kuali.student.enrollment.lui.infc.Lui;
31    import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo;
32    import org.kuali.student.r2.common.dto.IdEntityInfo;
33    import org.w3c.dom.Element;
34   
35   
36    /**
37    * Detailed information about a single LUI.
38    */
39   
40    @XmlAccessorType(XmlAccessType.FIELD)
41    @XmlType(name = "LuiInfo", propOrder = {"id","typeKey","stateKey","name", "descr", "luiCode", "cluId", "atpKey", "maxSeats", "effectiveDate", "expirationDate","metaInfo","attributes", "_futureElements"})
 
42    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 toggle private LuiInfo() {
69  0 super ();
70  0 luiCode = null;
71  0 cluId = null;
72  0 atpKey = null;
73  0 maxSeats = null;
74  0 effectiveDate = null;
75  0 expirationDate = null;
76  0 _futureElements = null;
77    }
78   
 
79  0 toggle private LuiInfo(Lui builder) {
80  0 super(builder);
81  0 this.luiCode = builder.getLuiCode();
82  0 this.cluId = builder.getCluId();
83  0 this.atpKey = builder.getAtpKey();
84  0 this.maxSeats =builder.getMaxSeats();
85  0 this.effectiveDate = null != builder.getEffectiveDate()? new Date(builder.getEffectiveDate().getTime()) : null;
86  0 this.expirationDate = null != builder.getExpirationDate()? new Date(builder.getExpirationDate().getTime()) : null;
87  0 this._futureElements = null;
88    }
89   
90    /**
91    * Code identifier/name for the LUI. This is typically used in
92    * human readable form (e.g. ENGL 100 section 123).
93    */
 
94  0 toggle @Override
95    public String getLuiCode() {
96  0 return luiCode;
97    }
98   
99    /**
100    * Unique identifier for a Canonical Learning Unit (CLU).
101    */
 
102  0 toggle @Override
103    public String getCluId() {
104  0 return cluId;
105    }
106   
107    /**
108    * Unique identifier for an Academic Time Period (ATP).
109    */
 
110  0 toggle @Override
111    public String getAtpKey() {
112  0 return atpKey;
113    }
114   
115    /**
116    * Maximum number of "seats" that the LUI will hold for registration.
117    */
 
118  0 toggle @Override
119    public Integer getMaxSeats() {
120  0 return maxSeats;
121    }
122   
123    /**
124    * Date and time that this LUI became effective. This is a similar
125    * concept to the effective date on enumerated values. When an
126    * expiration date has been specified, this field must be less
127    * than or equal to the expiration date.
128    */
 
129  0 toggle @Override
130    public Date getEffectiveDate() {
131  0 return effectiveDate;
132    }
133   
134    /**
135    * Date and time that this LUI expires. This is a similar concept
136    * to the expiration date on enumerated values. If specified, this
137    * should be greater than or equal to the effective date. If this
138    * field is not specified, then no expiration date has been
139    * currently defined and should automatically be considered
140    * greater than the effective date.
141    */
 
142  0 toggle @Override
143    public Date getExpirationDate() {
144  0 return expirationDate;
145    }
146   
147   
148   
 
149    public static class Builder extends IdEntityInfo.Builder implements ModelBuilder<LuiInfo>, Lui {
150   
151    private String luiCode;
152    private String cluId;
153    private String atpKey;
154    private Integer maxSeats;
155    private Date effectiveDate;
156    private Date expirationDate;
157   
 
158  0 toggle public Builder() {}
159   
 
160  0 toggle public Builder(Lui luiInfo) {
161  0 super(luiInfo);
162  0 this.luiCode = luiInfo.getLuiCode();
163  0 this.cluId = luiInfo.getCluId();
164  0 this.atpKey = luiInfo.getAtpKey();
165  0 this.maxSeats = luiInfo.getMaxSeats();
166  0 this.effectiveDate = luiInfo.getEffectiveDate();
167  0 this.expirationDate = luiInfo.getExpirationDate();
168    }
169   
 
170  0 toggle @Override
171    public LuiInfo build() {
172  0 return new LuiInfo(this);
173    }
174   
 
175  0 toggle @Override
176    public String getLuiCode() {
177  0 return luiCode;
178    }
179   
 
180  0 toggle public void setLuiCode(String luiCode) {
181  0 this.luiCode = luiCode;
182    }
183   
 
184  0 toggle @Override
185    public String getCluId() {
186  0 return cluId;
187    }
188   
 
189  0 toggle public void setCluId(String cluId) {
190  0 this.cluId = cluId;
191    }
192   
 
193  0 toggle @Override
194    public String getAtpKey() {
195  0 return atpKey;
196    }
197   
 
198  0 toggle public void setAtpKey(String atpKey) {
199  0 this.atpKey = atpKey;
200    }
201   
 
202  0 toggle @Override
203    public Integer getMaxSeats() {
204  0 return maxSeats;
205    }
206   
 
207  0 toggle public void setMaxSeats(Integer maxSeats) {
208  0 this.maxSeats = maxSeats;
209    }
210   
 
211  0 toggle @Override
212    public Date getEffectiveDate() {
213  0 return effectiveDate;
214    }
215   
 
216  0 toggle public void setEffectiveDate(Date effectiveDate) {
217  0 this.effectiveDate = effectiveDate;
218    }
219   
 
220  0 toggle @Override
221    public Date getExpirationDate() {
222  0 return expirationDate;
223    }
224   
 
225  0 toggle public void setExpirationDate(Date expirationDate) {
226  0 this.expirationDate = expirationDate;
227    }
228    }
229    }