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