1 | public class MonetoryAmount implements Serializable {↵ | | 1 | public class ↵
|
|
2 | private BigDecimal amount;↵ | | |
|
3 | private Currency currency;↵ | | |
|
4 | ↵ | | |
|
5 | public MonetoryAmount(BigDecimal amount, Currency currency↵ | | 2 | Item {↵
|
|
| | | 3 | private String code;↵
|
| | | 4 | private Product product;↵
|
| | | 5 | ↵
|
| | | 6 | ↵
|
| | | 7 | Item() {}↵
|
6 | ) {↵ | | 8 | public Item(String code, Product p) {↵
|
7 | this.amount = amount;↵ | | 9 | this.↵
|
8 | this.currency = currency↵ | | 10 | code = code;↵
|
9 | ;↵ | | 11 | this.product = p;↵
|
10 | }↵ | | 12 | }↵
|
11 | ↵ | | |
|
12 | public BigDecimal getAmount() {↵ | | 13 | public String getCode() {↵
|
13 | return amount;↵ | | 14 | return code;↵
|
14 | }↵ | | 15 | }↵
|
15 | ↵ | | 16 | ↵
|
16 | public void setAmount(BigDecimal amount) {↵ | | 17 | public void setCode(String code) {↵
|
17 | this.amount = amount;↵ | | 18 | this.code = code;↵
|
18 | }↵ | | 19 | }↵
|
| | | 20 | ↵
|
19 | public Currency getCurrency() {↵ | | 21 | public Product getProduct() {↵
|
20 | return currency;↵ | | 22 | return product;↵
|
21 | }↵ | | 23 | }↵
|
| | | 24 | ↵
|
22 | public void setCurrency(Currency currency) {↵ | | 25 | public void setProduct(Product product) {↵
|
23 | this.currency = currency | | 26 | this.product = product
|