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