View Javadoc
1   /*
2    *    Copyright 2010-2022 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       https://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.mybatis.jpetstore.domain;
17  
18  import java.io.Serializable;
19  import java.math.BigDecimal;
20  
21  /**
22   * The Class Item.
23   *
24   * @author Eduardo Macarron
25   */
26  public class Item implements Serializable {
27  
28    private static final long serialVersionUID = -2159121673445254631L;
29  
30    private String itemId;
31    private String productId;
32    private BigDecimal listPrice;
33    private BigDecimal unitCost;
34    private int supplierId;
35    private String status;
36    private String attribute1;
37    private String attribute2;
38    private String attribute3;
39    private String attribute4;
40    private String attribute5;
41    private Product product;
42    private int quantity;
43  
44    public String getItemId() {
45      return itemId;
46    }
47  
48    public void setItemId(String itemId) {
49      this.itemId = itemId.trim();
50    }
51  
52    public int getQuantity() {
53      return quantity;
54    }
55  
56    public void setQuantity(int quantity) {
57      this.quantity = quantity;
58    }
59  
60    public Product getProduct() {
61      return product;
62    }
63  
64    public void setProduct(Product product) {
65      this.product = product;
66    }
67  
68    public int getSupplierId() {
69      return supplierId;
70    }
71  
72    public void setSupplierId(int supplierId) {
73      this.supplierId = supplierId;
74    }
75  
76    public BigDecimal getListPrice() {
77      return listPrice;
78    }
79  
80    public void setListPrice(BigDecimal listPrice) {
81      this.listPrice = listPrice;
82    }
83  
84    public BigDecimal getUnitCost() {
85      return unitCost;
86    }
87  
88    public void setUnitCost(BigDecimal unitCost) {
89      this.unitCost = unitCost;
90    }
91  
92    public String getStatus() {
93      return status;
94    }
95  
96    public void setStatus(String status) {
97      this.status = status;
98    }
99  
100   public String getAttribute1() {
101     return attribute1;
102   }
103 
104   public void setAttribute1(String attribute1) {
105     this.attribute1 = attribute1;
106   }
107 
108   public String getAttribute2() {
109     return attribute2;
110   }
111 
112   public void setAttribute2(String attribute2) {
113     this.attribute2 = attribute2;
114   }
115 
116   public String getAttribute3() {
117     return attribute3;
118   }
119 
120   public void setAttribute3(String attribute3) {
121     this.attribute3 = attribute3;
122   }
123 
124   public String getAttribute4() {
125     return attribute4;
126   }
127 
128   public void setAttribute4(String attribute4) {
129     this.attribute4 = attribute4;
130   }
131 
132   public String getAttribute5() {
133     return attribute5;
134   }
135 
136   public void setAttribute5(String attribute5) {
137     this.attribute5 = attribute5;
138   }
139 
140   @Override
141   public String toString() {
142     return "(" + getItemId() + "-" + getProduct().getProductId() + ")";
143   }
144 
145 }