1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
package org.kuali.student.r2.common.dto; |
18 | |
|
19 | |
import java.io.Serializable; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import javax.xml.bind.annotation.XmlAccessType; |
23 | |
import javax.xml.bind.annotation.XmlAccessorType; |
24 | |
import javax.xml.bind.annotation.XmlAnyElement; |
25 | |
import javax.xml.bind.annotation.XmlAttribute; |
26 | |
import javax.xml.bind.annotation.XmlElement; |
27 | |
import javax.xml.bind.annotation.XmlType; |
28 | |
|
29 | |
import org.kuali.student.r2.common.infc.CurrencyAmount; |
30 | |
import org.w3c.dom.Element; |
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | 0 | @XmlAccessorType(XmlAccessType.FIELD) |
41 | |
@XmlType(name = "CurrencyAmountInfo", propOrder = { |
42 | |
"id", "currencyTypeKey", "currencyQuantity", |
43 | |
"meta", "_futureElements"}) |
44 | |
|
45 | |
public class CurrencyAmountInfo |
46 | |
implements CurrencyAmount, Serializable { |
47 | |
|
48 | |
private static final long serialVersionUID = 1L; |
49 | |
|
50 | |
@XmlAttribute |
51 | |
private String id; |
52 | |
|
53 | |
@XmlElement |
54 | |
private String currencyTypeKey; |
55 | |
|
56 | |
@XmlElement |
57 | |
private Integer currencyQuantity; |
58 | |
|
59 | |
@XmlElement |
60 | |
private MetaInfo meta; |
61 | |
|
62 | |
@XmlAnyElement |
63 | |
private List<Element> _futureElements; |
64 | |
|
65 | |
|
66 | |
|
67 | |
|
68 | 0 | public CurrencyAmountInfo() { |
69 | 0 | } |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | 0 | public CurrencyAmountInfo(CurrencyAmount currency) { |
77 | 0 | if (currency != null) { |
78 | 0 | this.id = currency.getId(); |
79 | 0 | this.currencyQuantity = currency.getCurrencyQuantity(); |
80 | 0 | this.currencyTypeKey = currency.getCurrencyTypeKey(); |
81 | 0 | if (currency.getMeta() != null ) { |
82 | 0 | this.meta = new MetaInfo(currency.getMeta()); |
83 | |
} |
84 | |
} |
85 | 0 | } |
86 | |
|
87 | |
@Override |
88 | |
public String getId() { |
89 | 0 | return id; |
90 | |
} |
91 | |
|
92 | |
public void setId(String id) { |
93 | 0 | this.id = id; |
94 | 0 | } |
95 | |
|
96 | |
@Override |
97 | |
public String getCurrencyTypeKey() { |
98 | 0 | return currencyTypeKey; |
99 | |
} |
100 | |
|
101 | |
public void setCurrencyTypeKey(String currencyTypeKey) { |
102 | 0 | this.currencyTypeKey = currencyTypeKey; |
103 | 0 | } |
104 | |
|
105 | |
@Override |
106 | |
public Integer getCurrencyQuantity() { |
107 | 0 | return currencyQuantity; |
108 | |
} |
109 | |
|
110 | |
public void setCurrencyQuantity(Integer currencyQuantity) { |
111 | 0 | this.currencyQuantity = currencyQuantity; |
112 | 0 | } |
113 | |
|
114 | |
@Override |
115 | |
public MetaInfo getMeta() { |
116 | 0 | return this.meta; |
117 | |
} |
118 | |
|
119 | |
public void setMeta(MetaInfo metaInfo) { |
120 | 0 | this.meta = metaInfo; |
121 | 0 | } |
122 | |
} |