1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.kuali.student.r2.lum.course.dto; |
12 | |
|
13 | |
import java.io.Serializable; |
14 | |
import java.util.ArrayList; |
15 | |
import java.util.List; |
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 | |
|
23 | |
import org.kuali.student.r2.common.dto.HasAttributesInfo; |
24 | |
import org.kuali.student.r2.lum.course.infc.CourseExpenditure; |
25 | |
import org.kuali.student.r2.lum.clu.dto.AffiliatedOrgInfo; |
26 | |
import org.kuali.student.r2.lum.clu.infc.AffiliatedOrg; |
27 | |
import org.w3c.dom.Element; |
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
@XmlType(name = "CourseExpenditureInfo", propOrder = {"affiliatedOrgs", "attributes", "_futureElements"}) |
33 | |
@XmlAccessorType(XmlAccessType.FIELD) |
34 | |
public class CourseExpenditureInfo extends HasAttributesInfo implements CourseExpenditure, Serializable { |
35 | |
|
36 | |
private static final long serialVersionUID = 1L; |
37 | |
|
38 | |
@XmlElement |
39 | |
private List<AffiliatedOrgInfo> affiliatedOrgs; |
40 | |
|
41 | |
@XmlAnyElement |
42 | |
private List<Element> _futureElements; |
43 | |
|
44 | 0 | public CourseExpenditureInfo() { |
45 | |
|
46 | 0 | } |
47 | |
|
48 | |
public CourseExpenditureInfo(CourseExpenditure courseExpenditure) { |
49 | 0 | super(courseExpenditure); |
50 | 0 | if (courseExpenditure != null) { |
51 | 0 | List<AffiliatedOrgInfo> affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(); |
52 | 0 | for (AffiliatedOrg afflOrg : courseExpenditure.getAffiliatedOrgs()) { |
53 | 0 | affiliatedOrgs.add(new AffiliatedOrgInfo(afflOrg)); |
54 | |
} |
55 | 0 | this.affiliatedOrgs = affiliatedOrgs; |
56 | |
} |
57 | 0 | } |
58 | |
|
59 | |
@Override |
60 | |
public List<AffiliatedOrgInfo> getAffiliatedOrgs() { |
61 | 0 | if (affiliatedOrgs == null) { |
62 | 0 | affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0); |
63 | |
} |
64 | 0 | return affiliatedOrgs; |
65 | |
} |
66 | |
|
67 | |
public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) { |
68 | 0 | this.affiliatedOrgs = affiliatedOrgs; |
69 | 0 | } |
70 | |
|
71 | |
} |