View Javadoc

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