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
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<Object> _futureElements;
46
47 public ExpenditureInfo() {
48 this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
49 }
50
51 public ExpenditureInfo(Expenditure expenditure) {
52 super(expenditure);
53 if (null != expenditure) {
54 this.id = expenditure.getId();
55 this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
56 for (AffiliatedOrg affiliatedOrg : expenditure.getAffiliatedOrgs()) {
57 this.affiliatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg));
58 }
59 }
60 }
61
62 @Override
63 public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
64 if (affiliatedOrgs == null) {
65 affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0);
66 }
67 return affiliatedOrgs;
68 }
69
70 public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
71 this.affiliatedOrgs = affiliatedOrgs;
72 }
73
74 @Override
75 public String getId() {
76 return id;
77 }
78
79 public void setId(String id) {
80 this.id = id;
81 }
82 }