1 | public class PurchaseDetail {↵ | | 1 | public class ↵
|
2 | ↵ | | |
|
3 | private PurchaseRecord purchaseRecord;↵ | | |
|
4 | ↵ | | |
|
5 | private String productId↵ | | 2 | ContractVariation implements Serializable {↵
|
| | | 3 | ↵
|
| | | 4 | private int version;↵
|
6 | ;↵ | | 5 | private Contract contract;↵
|
7 | private int quantity;↵ | | 6 | private String text;↵
|
8 | ↵ | | |
|
9 | public PurchaseDetail(PurchaseRecord record, String productId, int quantity) {↵ | | 7 | public ↵
|
10 | this.productId = productId;↵ | | |
|
11 | this.quantity = quantity;↵ | | |
|
12 | this.purchaseRecord = record↵ | | 8 | Contract getContract() {↵
|
| | | 9 | return contract;↵
|
| | | 10 | }↵
|
|
| | | 11 | public void setContract(Contract contract) {↵
|
13 | ;↵ | | 12 | this.contract = contract;↵
|
14 | }↵ | | 13 | }↵
|
|
15 | public PurchaseDetail() {}↵ | | 14 | public String getText() {↵
|
16 | ↵ | | 15 | ↵
|
17 | ↵ | | |
|
18 | /**↵ | | |
|
19 | * @return the purchaseRecord↵ | | |
|
20 | */↵ | | |
|
21 | public PurchaseRecord getPurchaseRecord() {↵ | | |
|
22 | return purchaseRecord;↵ | | |
|
23 | }↵ | | |
|
24 | /**↵ | | |
|
25 | * @param purchaseRecord the purchaseRecord to set↵ | | |
|
26 | */↵ | | |
|
27 | public void setPurchaseRecord(PurchaseRecord purchaseRecord) {↵ | | |
|
28 | this.purchaseRecord = purchaseRecord;↵ | | |
|
29 | }↵ | | |
|
30 | /**↵ | | |
|
31 | * @return the quantity↵ | | |
|
32 | */↵ | | |
|
33 | public int getQuantity() {↵ | | |
|
34 | return quantity;↵ | | |
|
35 | }↵ | | |
|
36 | /**↵ | | |
|
37 | * @param quantity the quantity to set↵ | | |
|
38 | */↵ | | |
|
39 | public void setQuantity(int quantity) {↵ | | |
|
40 | this.quantity = quantity;↵ | | |
|
41 | }↵ | | |
|
42 | /**↵ | | |
|
43 | * @return the productId↵ | | |
|
44 | */↵ | | |
|
45 | public String getProductId() {↵ | | |
|
46 | return productId;↵ | | |
|
47 | }↵ | | |
|
48 | /**↵ | | |
|
49 | * @param productId the productId to set↵ | | |
|
50 | */↵ | | |
|
51 | public void setProductId(String productId) {↵ | | |
|
52 | this.productId = productId | | 16 | return text;↵
|
| | | 17 | }↵
|
|
| | | 18 | public void setText(String text) {↵
|
| | | 19 | this.text = text;↵
|
| | | 20 | }↵
|
|
| | | 21 | public int getVersion() {↵
|
| | | 22 | return version;↵
|
| | | 23 | }↵
|
|
| | | 24 | public void setVersion(int version) {↵
|
| | | 25 | this.version = version;↵
|
| | | 26 | }↵
|
|
| | | 27 | public ContractVariation() {↵
|
| | | 28 | super();↵
|
| | | 29 | }↵
|
|
| | | 30 | public ContractVariation(int version, Contract contract) {↵
|
| | | 31 | this.contract = contract;↵
|
| | | 32 | this.version = version;↵
|
| | | 33 | contract.getVariations().add(this)
|