1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.common.dto; |
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 | |
|
28 | |
import org.kuali.student.r2.common.infc.TypeTypeRelation; |
29 | |
import org.w3c.dom.Element; |
30 | |
|
31 | |
@SuppressWarnings("serial") |
32 | |
@XmlAccessorType(XmlAccessType.FIELD) |
33 | |
@XmlType(name = "TypeTypeRelationInfo", propOrder = {"key", "typeKey", "stateKey", "name", "descr", "effectiveDate", "expirationDate", "ownerTypeKey", "relatedTypeKey", "rank", "attributes", "meta", "_futureElements"}) |
34 | |
public class TypeTypeRelationInfo extends KeyEntityInfo implements TypeTypeRelation, Serializable { |
35 | |
|
36 | |
@XmlElement |
37 | |
private Date effectiveDate; |
38 | |
|
39 | |
@XmlElement |
40 | |
private Date expirationDate; |
41 | |
|
42 | |
@XmlElement |
43 | |
private String ownerTypeKey; |
44 | |
|
45 | |
@XmlElement |
46 | |
private String relatedTypeKey; |
47 | |
|
48 | |
@XmlElement |
49 | |
private Integer rank; |
50 | |
|
51 | |
@XmlAnyElement |
52 | |
private List<Element> _futureElements; |
53 | |
|
54 | 0 | public TypeTypeRelationInfo() { |
55 | 0 | effectiveDate = null; |
56 | 0 | expirationDate = null; |
57 | 0 | ownerTypeKey = null; |
58 | 0 | relatedTypeKey = null; |
59 | 0 | rank = null; |
60 | 0 | _futureElements = null; |
61 | 0 | } |
62 | |
|
63 | |
public TypeTypeRelationInfo(TypeTypeRelation typeTypeRel) { |
64 | 0 | super(typeTypeRel); |
65 | 0 | this.effectiveDate = null != typeTypeRel.getEffectiveDate() ? new Date(typeTypeRel.getEffectiveDate().getTime()) : null; |
66 | 0 | this.expirationDate = null != typeTypeRel.getExpirationDate() ? new Date(typeTypeRel.getExpirationDate().getTime()) : null; |
67 | 0 | this.ownerTypeKey = typeTypeRel.getOwnerTypeKey(); |
68 | 0 | this.relatedTypeKey = typeTypeRel.getRelatedTypeKey(); |
69 | 0 | this.rank = typeTypeRel.getRank(); |
70 | 0 | this._futureElements = null; |
71 | 0 | } |
72 | |
|
73 | |
|
74 | |
@Override |
75 | |
public Date getEffectiveDate() { |
76 | 0 | return effectiveDate; |
77 | |
} |
78 | |
|
79 | |
|
80 | |
public void setEffectiveDate(Date effectiveDate) { |
81 | 0 | this.effectiveDate = new Date(effectiveDate.getTime()); |
82 | 0 | } |
83 | |
|
84 | |
@Override |
85 | |
public Date getExpirationDate() { |
86 | 0 | return expirationDate; |
87 | |
} |
88 | |
|
89 | |
|
90 | |
public void setExpirationDate(Date expirationDate) { |
91 | 0 | this.expirationDate = new Date(expirationDate.getTime()); |
92 | 0 | } |
93 | |
|
94 | |
@Override |
95 | |
public String getOwnerTypeKey() { |
96 | 0 | return ownerTypeKey; |
97 | |
} |
98 | |
|
99 | |
public void setOwnerTypeKey(String ownerTypeKey) { |
100 | 0 | this.ownerTypeKey = ownerTypeKey; |
101 | 0 | } |
102 | |
|
103 | |
@Override |
104 | |
public String getRelatedTypeKey() { |
105 | 0 | return relatedTypeKey; |
106 | |
} |
107 | |
|
108 | |
public void setRelatedTypeKey(String relatedTypeKey) { |
109 | 0 | this.relatedTypeKey = relatedTypeKey; |
110 | 0 | } |
111 | |
|
112 | |
@Override |
113 | |
public Integer getRank() { |
114 | 0 | return rank; |
115 | |
} |
116 | |
|
117 | |
public void setRank(int rank) { |
118 | 0 | this.rank = rank; |
119 | 0 | } |
120 | |
} |