View Javadoc

1   /*
2    * Copyright 2000-2004 The Apache Software Foundation.
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    *      http://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 com.ibatis.jpetstore.domain;
17  
18  import java.io.Serializable;
19  import java.math.BigDecimal;
20  
21  
22  public class Item implements Serializable {
23  
24    /* Private Fields */
25  
26    private String itemId;
27    private String productId;
28    private BigDecimal listPrice;
29    private BigDecimal unitCost;
30    private int supplierId;
31    private String status;
32    private String attribute1;
33    private String attribute2;
34    private String attribute3;
35    private String attribute4;
36    private String attribute5;
37    private Product product;
38    private int quantity;
39  
40    /* JavaBeans Properties */
41  
42    public String getItemId() {
43      return itemId;
44    }
45  
46    public void setItemId(String itemId) {
47      this.itemId = itemId.trim();
48    }
49  
50    public int getQuantity() {
51      return quantity;
52    }
53  
54    public void setQuantity(int quantity) {
55      this.quantity = quantity;
56    }
57  
58    public Product getProduct() {
59      return product;
60    }
61  
62    public void setProduct(Product product) {
63      this.product = product;
64    }
65  
66    public String getProductId() {
67      return productId;
68    }
69  
70    public void setProductId(String productId) {
71      this.productId = productId;
72    }
73  
74    public int getSupplierId() {
75      return supplierId;
76    }
77  
78    public void setSupplierId(int supplierId) {
79      this.supplierId = supplierId;
80    }
81  
82    public BigDecimal getListPrice() {
83      return listPrice;
84    }
85  
86    public void setListPrice(BigDecimal listPrice) {
87      this.listPrice = listPrice;
88    }
89  
90    public BigDecimal getUnitCost() {
91      return unitCost;
92    }
93  
94    public void setUnitCost(BigDecimal unitCost) {
95      this.unitCost = unitCost;
96    }
97  
98    public String getStatus() {
99      return status;
100   }
101 
102   public void setStatus(String status) {
103     this.status = status;
104   }
105 
106   public String getAttribute1() {
107     return attribute1;
108   }
109 
110   public void setAttribute1(String attribute1) {
111     this.attribute1 = attribute1;
112   }
113 
114   public String getAttribute2() {
115     return attribute2;
116   }
117 
118   public void setAttribute2(String attribute2) {
119     this.attribute2 = attribute2;
120   }
121 
122   public String getAttribute3() {
123     return attribute3;
124   }
125 
126   public void setAttribute3(String attribute3) {
127     this.attribute3 = attribute3;
128   }
129 
130   public String getAttribute4() {
131     return attribute4;
132   }
133 
134   public void setAttribute4(String attribute4) {
135     this.attribute4 = attribute4;
136   }
137 
138   public String getAttribute5() {
139     return attribute5;
140   }
141 
142   public void setAttribute5(String attribute5) {
143     this.attribute5 = attribute5;
144   }
145 
146   /* Public Methods */
147 
148   public String toString() {
149     return "(" + getItemId().trim() + "-" + getProductId().trim() + ")";
150   }
151 
152 }