1 /*
2 * Copyright 2010-2026 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 public class Item implements Serializable {
25
26 /** The serial version uid. */
27 private static final long serialVersionUID = -2159121673445254631L;
28
29 /** The item id. */
30 private String itemId;
31 /** The list price. */
32 private BigDecimal listPrice;
33 /** The unit cost. */
34 private BigDecimal unitCost;
35 /** The supplier id. */
36 private int supplierId;
37 /** The status. */
38 private String status;
39 /** The attribute1. */
40 private String attribute1;
41 /** The attribute2. */
42 private String attribute2;
43 /** The attribute3. */
44 private String attribute3;
45 /** The attribute4. */
46 private String attribute4;
47 /** The attribute5. */
48 private String attribute5;
49 /** The product. */
50 private Product product;
51 /** The quantity. */
52 private int quantity;
53
54 /**
55 * Gets the item id.
56 *
57 * @return the item id
58 */
59 public String getItemId() {
60 return itemId;
61 }
62
63 /**
64 * Sets the item id.
65 *
66 * @param itemId
67 * the item id
68 */
69 public void setItemId(String itemId) {
70 this.itemId = itemId.trim();
71 }
72
73 /**
74 * Gets the quantity.
75 *
76 * @return the quantity
77 */
78 public int getQuantity() {
79 return quantity;
80 }
81
82 /**
83 * Sets the quantity.
84 *
85 * @param quantity
86 * the quantity
87 */
88 public void setQuantity(int quantity) {
89 this.quantity = quantity;
90 }
91
92 /**
93 * Gets the product.
94 *
95 * @return the product
96 */
97 public Product getProduct() {
98 return product;
99 }
100
101 /**
102 * Sets the product.
103 *
104 * @param product
105 * the product
106 */
107 public void setProduct(Product product) {
108 this.product = product;
109 }
110
111 /**
112 * Gets the supplier id.
113 *
114 * @return the supplier id
115 */
116 public int getSupplierId() {
117 return supplierId;
118 }
119
120 /**
121 * Sets the supplier id.
122 *
123 * @param supplierId
124 * the supplier id
125 */
126 public void setSupplierId(int supplierId) {
127 this.supplierId = supplierId;
128 }
129
130 /**
131 * Gets the list price.
132 *
133 * @return the list price
134 */
135 public BigDecimal getListPrice() {
136 return listPrice;
137 }
138
139 /**
140 * Sets the list price.
141 *
142 * @param listPrice
143 * the list price
144 */
145 public void setListPrice(BigDecimal listPrice) {
146 this.listPrice = listPrice;
147 }
148
149 /**
150 * Gets the unit cost.
151 *
152 * @return the unit cost
153 */
154 public BigDecimal getUnitCost() {
155 return unitCost;
156 }
157
158 /**
159 * Sets the unit cost.
160 *
161 * @param unitCost
162 * the unit cost
163 */
164 public void setUnitCost(BigDecimal unitCost) {
165 this.unitCost = unitCost;
166 }
167
168 /**
169 * Gets the status.
170 *
171 * @return the status
172 */
173 public String getStatus() {
174 return status;
175 }
176
177 /**
178 * Sets the status.
179 *
180 * @param status
181 * the status
182 */
183 public void setStatus(String status) {
184 this.status = status;
185 }
186
187 /**
188 * Gets the attribute1.
189 *
190 * @return the attribute1
191 */
192 public String getAttribute1() {
193 return attribute1;
194 }
195
196 /**
197 * Sets the attribute1.
198 *
199 * @param attribute1
200 * the attribute1
201 */
202 public void setAttribute1(String attribute1) {
203 this.attribute1 = attribute1;
204 }
205
206 /**
207 * Gets the attribute2.
208 *
209 * @return the attribute2
210 */
211 public String getAttribute2() {
212 return attribute2;
213 }
214
215 /**
216 * Sets the attribute2.
217 *
218 * @param attribute2
219 * the attribute2
220 */
221 public void setAttribute2(String attribute2) {
222 this.attribute2 = attribute2;
223 }
224
225 /**
226 * Gets the attribute3.
227 *
228 * @return the attribute3
229 */
230 public String getAttribute3() {
231 return attribute3;
232 }
233
234 /**
235 * Sets the attribute3.
236 *
237 * @param attribute3
238 * the attribute3
239 */
240 public void setAttribute3(String attribute3) {
241 this.attribute3 = attribute3;
242 }
243
244 /**
245 * Gets the attribute4.
246 *
247 * @return the attribute4
248 */
249 public String getAttribute4() {
250 return attribute4;
251 }
252
253 /**
254 * Sets the attribute4.
255 *
256 * @param attribute4
257 * the attribute4
258 */
259 public void setAttribute4(String attribute4) {
260 this.attribute4 = attribute4;
261 }
262
263 /**
264 * Gets the attribute5.
265 *
266 * @return the attribute5
267 */
268 public String getAttribute5() {
269 return attribute5;
270 }
271
272 /**
273 * Sets the attribute5.
274 *
275 * @param attribute5
276 * the attribute5
277 */
278 public void setAttribute5(String attribute5) {
279 this.attribute5 = attribute5;
280 }
281
282 @Override
283 public String toString() {
284 return "(" + getItemId() + "-" + getProduct().getProductId() + ")";
285 }
286
287 }