1 | public class PurchaseDetail {↵ | | 1 | public class P↵
|
2 | ↵ | | |
|
3 | private PurchaseRecord purchaseRecord;↵ | | |
|
4 | ↵ | | 2 | erson {↵
|
| | | 3 | private Long pk;
↵
|
5 | private String productId;↵ | | 4 | private String name;
↵
|
6 | private int quantity;↵ | | 5 | private int ↵
|
7 | ↵ | | |
|
8 | public PurchaseDetail(PurchaseRecord record, String productId, int quantity↵ | | 6 | id;↵
|
|
| | | 7 | public Person() {↵
|
| | | 8 | }↵
|
|
9 | ) {↵ | | 9 | public Person(Long pk, String name, int id) {
↵
|
10 | this.productId = productId;↵ | | 10 | this.p↵
|
11 | this.quantity = quantity;↵ | | |
|
12 | this.purchaseRecord = recor↵ | | 11 | k = pk;↵
|
| | | 12 | this.name = name;↵
|
13 | d;↵ | | 13 | this.id = id;
↵
|
14 | }↵ | | 14 | }↵
|
15 | public PurchaseDetail() {}↵ | | |
|
16 | ↵ | | |
|
17 | ↵ | | |
|
18 | /**↵ | | |
|
19 | * @return the purchaseRecord↵ | | |
|
20 | */↵ | | |
|
21 | public PurchaseRecord getPurchaseRecord↵ | | |
|
|
22 | () {↵ | | 15 | public Long getPk() {
↵
|
23 | return purchaseRecord;↵ | | 16 | return p↵
|
24 | }↵ | | |
|
25 | /**↵ | | |
|
26 | * @param purchaseRecord the purchaseRecord to set↵ | | |
|
27 | */↵ | | |
|
28 | public void setPurchaseRecord(PurchaseRecord purchaseRecord↵ | | 17 | k;↵
|
| | | 18 | }↵
|
|
29 | ) {↵ | | 19 | public void setPk(Long pk) {
↵
|
30 | this.purchaseRecord = purchaseRecord;↵ | | 20 | this.p↵
|
31 | }↵ | | |
|
32 | /**↵ | | |
|
33 | * @return the quantity↵ | | |
|
34 | */↵ | | 21 | k = pk;↵
|
| | | 22 | }↵
|
| | | 23 |
↵
|
35 | public int getQuantity() {↵ | | 24 | public String getName() {
↵
|
36 | return quantity;↵ | | 25 | return ↵
|
37 | }↵ | | |
|
38 | /**↵ | | |
|
39 | * @param quantity the quantity to set↵ | | |
|
40 | */↵ | | 26 | name;↵
|
| | | 27 | }↵
|
| | | 28 |
↵
|
41 | public void setQuantity(int quantity) {↵ | | 29 | public void setName(String name) {
↵
|
42 | this.quantity = quantity;↵ | | 30 | this.↵
|
43 | }↵ | | |
|
44 | /**↵ | | |
|
45 | * @return the productId↵ | | |
|
46 | */↵ | | 31 | name = name;↵
|
| | | 32 | }↵
|
| | | 33 |
↵
|
47 | public String getProductId() {↵ | | 34 | public int getId() {
↵
|
48 | return productId;↵ | | 35 | return id;
↵
|
49 | }↵ | | 36 | }↵
|
50 | /**↵ | | |
|
51 | * @param productId the productId to set↵ | | |
|
52 | */↵ | | |
|
| | | 37 |
↵
|
53 | public void setProductId(String productId) {↵ | | 38 | public void setId(int id) {
↵
|
54 | this.productId = productId | | 39 | this.id = id
|