1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.core.document.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.common.dto.KeyEntityInfo; |
19 | |
import org.kuali.student.r2.core.document.infc.DocumentCategory; |
20 | |
import org.w3c.dom.Element; |
21 | |
|
22 | |
import javax.xml.bind.annotation.*; |
23 | |
import java.io.Serializable; |
24 | |
import java.util.Date; |
25 | |
import java.util.List; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@XmlAccessorType(XmlAccessType.FIELD) |
37 | |
@XmlType(name = "DocumentCategoryInfo", propOrder = { "key", "typeKey", "stateKey", |
38 | |
"name", "descr", "effectiveDate", "expirationDate", "meta", "attributes", "_futureElements" }) |
39 | |
public class DocumentCategoryInfo extends KeyEntityInfo implements DocumentCategory, Serializable { |
40 | |
|
41 | |
private static final long serialVersionUID = 1L; |
42 | |
|
43 | |
@XmlElement |
44 | |
private Date effectiveDate; |
45 | |
|
46 | |
@XmlElement |
47 | |
private Date expirationDate; |
48 | |
|
49 | |
@XmlAnyElement |
50 | |
private List<Element> _futureElements; |
51 | |
|
52 | 0 | public DocumentCategoryInfo() { |
53 | 0 | } |
54 | |
|
55 | |
public DocumentCategoryInfo(DocumentCategory documentCategory) { |
56 | 0 | super(documentCategory); |
57 | 0 | if (null != documentCategory) { |
58 | 0 | this.effectiveDate = (null != documentCategory.getEffectiveDate()) ? new Date(documentCategory.getEffectiveDate().getTime()) : null; |
59 | 0 | this.expirationDate = (null != documentCategory.getExpirationDate()) ? new Date(documentCategory.getExpirationDate().getTime()) : null; |
60 | |
} |
61 | 0 | } |
62 | |
|
63 | |
@Override |
64 | |
public Date getEffectiveDate() { |
65 | 0 | return effectiveDate; |
66 | |
} |
67 | |
|
68 | |
public void setEffectiveDate(Date effectiveDate) { |
69 | 0 | this.effectiveDate = effectiveDate; |
70 | 0 | } |
71 | |
|
72 | |
@Override |
73 | |
public Date getExpirationDate() { |
74 | 0 | return expirationDate; |
75 | |
} |
76 | |
|
77 | |
public void setExpirationDate(Date expirationDate) { |
78 | 0 | this.expirationDate = expirationDate; |
79 | 0 | } |
80 | |
|
81 | |
} |