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