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