1 | public class MonetoryAmount implements Serializable {↵ | | 1 | public static class Id implements Serializable {↵
|
|
2 | private BigDecimal amount;↵ | | 2 | private KeyManyToOneKeyEntity key1;↵
|
3 | private Currency currency;↵ | | 3 | private String key2;↵
|
|
4 | ↵ | | 4 | ↵
|
5 | public MonetoryAmount(BigDecimal amount, Currency currency) {↵ | | 5 | public Id(KeyManyToOneKeyEntity key1, String key2) {↵
|
6 | this.amount = amount;↵ | | 6 | this.key1 = key1;↵
|
7 | this.currency = currency;↵ | | 7 | this.↵
|
8 | }↵ | | 8 | key2 = key2;↵
|
| | | 9 | }↵
|
|
9 | ↵ | | 10 | ↵
|
10 | public BigDecimal getAmount() {↵ | | 11 | public KeyManyToOneKeyEntity getKey1() {↵
|
11 | return amount;↵ | | 12 | return key1;↵
|
12 | }↵ | | 13 | }↵
|
13 | ↵ | | |
|
14 | public void setAmount(BigDecimal amount) {↵ | | 14 | public void setKey1(KeyManyToOneKeyEntity key1) {↵
|
15 | this.amount = amount;↵ | | 15 | this.key1 = key1;↵
|
16 | }↵ | | 16 | }↵
|
|
17 | public Currency getCurrency() {↵ | | 17 | public String getKey2() {↵
|
18 | return currency;↵ | | 18 | return key2;↵
|
19 | }↵ | | 19 | }↵
|
|
20 | public void setCurrency(Currency currency) {↵ | | 20 | public void setKey2(String key2) {↵
|
21 | this.currency = currency;↵ | | 21 | this.key2 = key2;↵
|
22 | | | 22 |
|