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.CurrencyAmountInfo; |
19 | |
import org.kuali.student.r2.common.dto.HasAttributesAndMetaInfo; |
20 | |
import org.kuali.student.r2.common.dto.RichTextInfo; |
21 | |
import org.kuali.student.r2.common.infc.CurrencyAmount; |
22 | |
import org.kuali.student.r2.lum.clu.infc.Fee; |
23 | |
import org.w3c.dom.Element; |
24 | |
|
25 | |
import javax.xml.bind.annotation.XmlAccessType; |
26 | |
import javax.xml.bind.annotation.XmlAccessorType; |
27 | |
import javax.xml.bind.annotation.XmlAnyElement; |
28 | |
import javax.xml.bind.annotation.XmlAttribute; |
29 | |
import javax.xml.bind.annotation.XmlElement; |
30 | |
import javax.xml.bind.annotation.XmlType; |
31 | |
import java.io.Serializable; |
32 | |
import java.util.ArrayList; |
33 | |
import java.util.List; |
34 | |
|
35 | |
|
36 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
37 | |
@XmlType(name = "FeeInfo", propOrder = {"feeType", "rateType", "feeAmounts", |
38 | |
"descr", "key", "meta", "attributes", "_futureElements"}) |
39 | |
public class FeeInfo extends HasAttributesAndMetaInfo implements Fee, Serializable { |
40 | |
|
41 | |
private static final long serialVersionUID = 1L; |
42 | |
|
43 | |
@XmlElement |
44 | |
private String feeType; |
45 | |
@XmlElement |
46 | |
private String rateType; |
47 | |
@XmlElement |
48 | |
private List<CurrencyAmountInfo> feeAmounts; |
49 | |
@XmlElement |
50 | |
private RichTextInfo descr; |
51 | |
@XmlAttribute |
52 | |
private String key; |
53 | |
@XmlAnyElement |
54 | |
private List<Element> _futureElements; |
55 | |
|
56 | 0 | public FeeInfo() { |
57 | 0 | this.feeAmounts = new ArrayList<CurrencyAmountInfo>(); |
58 | 0 | } |
59 | |
|
60 | |
public FeeInfo(Fee fee) { |
61 | 0 | super(fee); |
62 | 0 | if (null != fee) { |
63 | 0 | this.feeType = fee.getFeeType(); |
64 | 0 | this.rateType = fee.getRateType(); |
65 | 0 | this.feeAmounts = new ArrayList<CurrencyAmountInfo>(); |
66 | 0 | for (CurrencyAmount currencyAmount : fee.getFeeAmounts()) { |
67 | 0 | this.feeAmounts.add(new CurrencyAmountInfo(currencyAmount)); |
68 | |
} |
69 | 0 | this.key = fee.getKey(); |
70 | 0 | this.descr = (null != fee.getDescr()) ? new RichTextInfo(fee.getDescr()) : null; |
71 | |
} |
72 | 0 | } |
73 | |
|
74 | |
@Override |
75 | |
public String getFeeType() { |
76 | 0 | return feeType; |
77 | |
} |
78 | |
|
79 | |
public void setFeeType(String feeType) { |
80 | 0 | this.feeType = feeType; |
81 | 0 | } |
82 | |
|
83 | |
|
84 | |
@Override |
85 | |
public String getRateType() { |
86 | 0 | return rateType; |
87 | |
} |
88 | |
|
89 | |
public void setRateType(String rateType) { |
90 | 0 | this.rateType = rateType; |
91 | 0 | } |
92 | |
|
93 | |
@Override |
94 | |
public List<CurrencyAmountInfo> getFeeAmounts() { |
95 | 0 | if (feeAmounts == null) { |
96 | 0 | feeAmounts = new ArrayList<CurrencyAmountInfo>(0); |
97 | |
} |
98 | 0 | return feeAmounts; |
99 | |
} |
100 | |
|
101 | |
public void setFeeAmounts(List<CurrencyAmountInfo> feeAmounts) { |
102 | 0 | this.feeAmounts = feeAmounts; |
103 | 0 | } |
104 | |
|
105 | |
@Override |
106 | |
public RichTextInfo getDescr() { |
107 | 0 | return descr; |
108 | |
} |
109 | |
|
110 | |
public void setDescr(RichTextInfo descr) { |
111 | 0 | this.descr = descr; |
112 | 0 | } |
113 | |
|
114 | |
@Override |
115 | |
public String getKey() { |
116 | 0 | return key; |
117 | |
} |
118 | |
|
119 | |
public void setId(String key) { |
120 | 0 | this.key = key; |
121 | 0 | } |
122 | |
} |