View Javadoc

1   /*
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  package org.kuali.student.contract.model.test.source;
16  
17  import java.io.Serializable;
18  import java.util.Date;
19  import java.util.List;
20  
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlAnyElement;
24  import javax.xml.bind.annotation.XmlElement;
25  import javax.xml.bind.annotation.XmlType;
26  import org.kuali.student.contract.model.test.source.KeyEntityInfo;
27  
28  import org.w3c.dom.Element;
29  
30  @XmlAccessorType(XmlAccessType.FIELD)
31  @XmlType(name = "AtpInfo", propOrder = { "key", "typeKey", "stateKey", "name",
32  		"descr", "startDate", "endDate", "meta", "attributes",
33  		"_futureElements" })
34  public class AtpInfo extends KeyEntityInfo implements Serializable {
35  
36  	private static final long serialVersionUID = 1L;
37  	@XmlElement
38  	private Date startDate;
39  	@XmlElement
40  	private Date endDate;
41  	@XmlAnyElement
42  	private List<Element> _futureElements;
43  
44  	public static AtpInfo newInstance() {
45  		return new AtpInfo();
46  	}
47  
48  	public AtpInfo() {
49  		startDate = null;
50  		endDate = null;
51  		_futureElements = null;
52  	}
53  
54  
55  	public Date getStartDate() {
56  		return startDate != null ? new Date(startDate.getTime()) : null;
57  	}
58  
59  	
60  	public void setStartDate(Date startDate) {
61  		if (startDate != null)
62  			this.startDate = new Date(startDate.getTime());
63  	}
64  
65  	public Date getEndDate() {
66  		return endDate != null ? new Date(endDate.getTime()) : null;
67  	}
68  
69  	
70  	public void setEndDate(Date endDate) {
71  		if (endDate != null)
72  			this.endDate = new Date(endDate.getTime());
73  	}
74  }