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.IdNamelessEntityInfo;
24 import org.kuali.student.r2.lum.course.infc.CourseRevenue;
25 import org.kuali.student.r2.lum.clu.dto.AffiliatedOrgInfo;
26 import org.kuali.student.r2.lum.clu.infc.AffiliatedOrg;
27
28
29
30
31
32
33
34
35
36
37
38
39 @XmlType(name = "CourseRevenueInfo", propOrder = {"id", "typeKey", "stateKey", "affiliatedOrgs", "feeType", "meta", "attributes" , "_futureElements" })
40 @XmlAccessorType(XmlAccessType.FIELD)
41 public class CourseRevenueInfo extends IdNamelessEntityInfo implements CourseRevenue, Serializable {
42
43 private static final long serialVersionUID = 1L;
44
45 @XmlElement
46 private String feeType;
47
48 @XmlElement
49 private List<AffiliatedOrgInfo> affiliatedOrgs;
50
51 @XmlAnyElement
52 private List<Object> _futureElements;
53
54 public CourseRevenueInfo() {
55
56 }
57
58 public CourseRevenueInfo(CourseRevenue courseRevenue) {
59 super(courseRevenue);
60 if (courseRevenue != null) {
61 this.feeType = courseRevenue.getFeeType();
62 List<AffiliatedOrgInfo> affilatedOrgs = new ArrayList<AffiliatedOrgInfo>();
63
64 for (AffiliatedOrg affiliatedOrg : courseRevenue.getAffiliatedOrgs()) {
65 affilatedOrgs.add(new AffiliatedOrgInfo(affiliatedOrg));
66
67 }
68 this.affiliatedOrgs = affilatedOrgs;
69 }
70 }
71
72
73
74
75
76 @Override
77 public String getFeeType() {
78 return feeType;
79 }
80
81 public void setFeeType(String feeType) {
82 this.feeType = feeType;
83 }
84
85
86
87
88 @Override
89 public List<AffiliatedOrgInfo> getAffiliatedOrgs() {
90 if (affiliatedOrgs == null) {
91 affiliatedOrgs = new ArrayList<AffiliatedOrgInfo>(0);
92 }
93 return affiliatedOrgs;
94 }
95
96 public void setAffiliatedOrgs(List<AffiliatedOrgInfo> affiliatedOrgs) {
97 this.affiliatedOrgs = affiliatedOrgs;
98 }
99
100 }