KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jfox > petstore > entity > Item


1 /*
2  * JFox - The most lightweight Java EE Application Server!
3  * more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
4  *
5  * JFox is licenced and re-distributable under GNU LGPL.
6  */

7 package org.jfox.petstore.entity;
8
9 import java.io.Serializable JavaDoc;
10 import javax.persistence.Entity;
11 import javax.persistence.Column;
12
13 import org.jfox.entity.annotation.MappingColumn;
14 import org.jfox.entity.annotation.ParameterMap;
15 import org.jfox.petstore.dao.ProductDAOImpl;
16
17 /**
18  * Item means a item of a product
19  */

20 @Entity
21 public class Item implements Serializable JavaDoc {
22
23     @Column(name="itemid")
24     String JavaDoc itemId;
25
26     @Column(name="qty")
27     int quantity;
28
29     @MappingColumn(namedQuery = ProductDAOImpl.GET_PRODUCT,
30             params = {@ParameterMap(name="id",value = "$this.getProductId()")})
31     Product product;
32
33     @Column(name="productid")
34     String JavaDoc productId;
35
36     @Column(name="supplier")
37     int supplierId;
38
39     @Column(name="listprice")
40     double listPrice;
41
42     @Column(name="unitcost")
43     double unitCost;
44
45     @Column(name="status")
46     String JavaDoc status;
47
48     @Column(name = "attr1")
49     String JavaDoc attribute1;
50
51     @Column(name = "attr2")
52     String JavaDoc attribute2;
53
54     @Column(name = "attr3")
55     String JavaDoc attribute3;
56
57     @Column(name = "attr4")
58     String JavaDoc attribute4;
59
60     @Column(name = "attr5")
61     String JavaDoc attribute5;
62
63     public String JavaDoc getItemId() {
64         return itemId;
65     }
66
67     public void setItemId(String JavaDoc itemId) {
68         this.itemId = itemId;
69     }
70
71     public int getQuantity() {
72         return quantity;
73     }
74
75     public void setQuantity(int quantity) {
76         this.quantity = quantity;
77     }
78
79     public Product getProduct() {
80         return product;
81     }
82
83     public void setProduct(Product product) {
84         this.product = product;
85     }
86
87     public String JavaDoc getProductId() {
88         return productId;
89     }
90
91     public void setProductId(String JavaDoc productId) {
92         this.productId = productId;
93     }
94
95     public int getSupplierId() {
96         return supplierId;
97     }
98
99     public void setSupplierId(int supplierId) {
100         this.supplierId = supplierId;
101     }
102
103     public double getListPrice() {
104         return listPrice;
105     }
106
107     public void setListPrice(double listPrice) {
108         this.listPrice = listPrice;
109     }
110
111     public double getUnitCost() {
112         return unitCost;
113     }
114
115     public void setUnitCost(double unitCost) {
116         this.unitCost = unitCost;
117     }
118
119     public String JavaDoc getStatus() {
120         return status;
121     }
122
123     public void setStatus(String JavaDoc status) {
124         this.status = status;
125     }
126
127     public String JavaDoc getAttribute1() {
128         return attribute1;
129     }
130
131     public void setAttribute1(String JavaDoc attribute1) {
132         this.attribute1 = attribute1;
133     }
134
135     public String JavaDoc getAttribute2() {
136         return attribute2;
137     }
138
139     public void setAttribute2(String JavaDoc attribute2) {
140         this.attribute2 = attribute2;
141     }
142
143     public String JavaDoc getAttribute3() {
144         return attribute3;
145     }
146
147     public void setAttribute3(String JavaDoc attribute3) {
148         this.attribute3 = attribute3;
149     }
150
151     public String JavaDoc getAttribute4() {
152         return attribute4;
153     }
154
155     public void setAttribute4(String JavaDoc attribute4) {
156         this.attribute4 = attribute4;
157     }
158
159     public String JavaDoc getAttribute5() {
160         return attribute5;
161     }
162
163     public void setAttribute5(String JavaDoc attribute5) {
164         this.attribute5 = attribute5;
165     }
166 }
167
Popular Tags