1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.r2.lum.clu.dto; |
17 | |
|
18 | |
import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo; |
19 | |
import org.kuali.student.r2.lum.clu.infc.AffiliatedOrg; |
20 | |
import org.kuali.student.r2.lum.clu.infc.Expenditure; |
21 | |
import org.w3c.dom.Element; |
22 | |
|
23 | |
import javax.xml.bind.annotation.XmlAccessType; |
24 | |
import javax.xml.bind.annotation.XmlAccessorType; |
25 | |
import javax.xml.bind.annotation.XmlAnyElement; |
26 | |
import javax.xml.bind.annotation.XmlAttribute; |
27 | |
import javax.xml.bind.annotation.XmlElement; |
28 | |
import javax.xml.bind.annotation.XmlType; |
29 | |
import java.io.Serializable; |
30 | |
import java.util.ArrayList; |
31 | |
import java.util.List; |
32 | |
|
33 | |
@XmlAccessorType(XmlAccessType.FIELD) |
34 | |
@XmlType(name = "ExpenditureInfo", propOrder = {"id", "affiliatedOrgs", |
35 | |
"attributes", "meta", "_futureElements"}) |
36 | |
public class ExpenditureInfo extends HasAttributesAndMetaInfo implements Expenditure, Serializable { |
37 | |
|
38 | |
private static final long serialVersionUID = 1L; |
39 | |
|
40 | |
@XmlAttribute |
41 | |
private String id; |
42 | |
@XmlElement |
43 | |
private List<AffiliatedOrgInfo> affiliatedOrgs; |
44 | |
@XmlAnyElement |
45 | |
private List<Element> _futureElements; |
46 | |
|
47 | 0 | public ExpenditureInfo() { |
48 | 0 | this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(); |
49 | 0 | } |
50 | |
|
51 | |
public ExpenditureInfo(Expenditure expenditure) { |
52 | 0 | super(expenditure); |
53 | 0 | if (null != expenditure) { |
54 | 0 | this.id = expenditure.getId(); |
55 | 0 | this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(); |
56 | 0 | for (AffiliatedOrg affiliatedOrg : expenditure.getAffiliatedOrgs()) { |
57 | 0 | this.affiliatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg)); |
58 | |
} |
59 | |
} |
60 | 0 | } |
61 | |
|
62 | |
@Override |
63 | |
public List<AffiliatedOrgInfo> getAffiliatedOrgs() { |
64 | 0 | if (affiliatedOrgs == null) { |
65 | 0 | affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0); |
66 | |
} |
67 | 0 | return affiliatedOrgs; |
68 | |
} |
69 | |
|
70 | |
public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) { |
71 | 0 | this.affiliatedOrgs = affiliatedOrgs; |
72 | 0 | } |
73 | |
|
74 | |
@Override |
75 | |
public String getId() { |
76 | 0 | return id; |
77 | |
} |
78 | |
|
79 | |
public void setId(String id) { |
80 | 0 | this.id = id; |
81 | 0 | } |
82 | |
} |