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.Revenue;
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
34 @XmlAccessorType(XmlAccessType.FIELD)
35 @XmlType(name = "RevenueInfo", propOrder = {"id", "feeType", "affiliatedOrgs",
36 "attributes", "meta" , "_futureElements" })
37 public class RevenueInfo extends HasAttributesAndMetaInfo implements Revenue, Serializable {
38
39 private static final long serialVersionUID = 1L;
40
41 @XmlAttribute
42 private String id;
43 @XmlElement
44 private String feeType;
45 @XmlElement
46 private List<AffiliatedOrgInfo> affiliatedOrgs;
47
48 @XmlAnyElement
49 private List<Object> _futureElements;
50
51 public RevenueInfo() {
52 this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
53 }
54
55 public RevenueInfo(Revenue revenue) {
56 super(revenue);
57 if (null != revenue) {
58 this.id = revenue.getId();
59 this.feeType = revenue.getFeeType();
60 this.affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>();
61 for (AffiliatedOrg affiliatedOrg : revenue.getAffiliatedOrgs()) {
62 this.affiliatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg));
63 }
64 }
65 }
66
67 @Override
68 public String getFeeType() {
69 return feeType;
70 }
71
72 public void setFeeType(String feeType) {
73 this.feeType = feeType;
74 }
75
76 @Override
77 public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
78 if (affiliatedOrgs == null) {
79 affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0);
80 }
81 return affiliatedOrgs;
82 }
83
84 public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
85 this.affiliatedOrgs = affiliatedOrgs;
86 }
87
88 @Override
89 public String getId() {
90 return id;
91 }
92
93 public void setId(String id) {
94 this.id = id;
95 }
96 }