KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.Date JavaDoc;
11 import java.util.List JavaDoc;
12 import javax.persistence.Entity;
13 import javax.persistence.Column;
14
15 import org.jfox.entity.annotation.MappingColumn;
16 import org.jfox.entity.annotation.ParameterMap;
17 import org.jfox.petstore.dao.OrderDAOImpl;
18
19 @Entity
20 public class Order implements Serializable JavaDoc {
21
22     @Column(name = "orderid")
23     long orderId;
24
25     @Column(name = "userid")
26     String JavaDoc username;
27
28     @Column(name = "orderdate")
29     Date JavaDoc orderDate;
30
31     @Column(name = "shipaddr1")
32     String JavaDoc shipAddress1;
33
34     @Column(name = "shipaddr2")
35     String JavaDoc shipAddress2;
36
37     @Column(name = "shipcity")
38     String JavaDoc shipCity;
39
40     @Column(name = "shipstate")
41     String JavaDoc shipState;
42
43     @Column(name = "shipzip")
44     String JavaDoc shipZip;
45
46     @Column(name = "shipcountry")
47     String JavaDoc shipCountry;
48
49     @Column(name = "billaddr1")
50     String JavaDoc billAddress1;
51
52     @Column(name = "billaddr2")
53     String JavaDoc billAddress2;
54
55     @Column(name = "billcity")
56     String JavaDoc billCity;
57
58     @Column(name = "billstate")
59     String JavaDoc billState;
60
61     @Column(name = "billzip")
62     String JavaDoc billZip;
63
64     @Column(name = "billcountry")
65     String JavaDoc billCountry;
66
67     @Column(name = "courier")
68     String JavaDoc courier;
69
70     @Column(name = "totalprice")
71     double totalPrice;
72
73     @Column(name = "billtofirstname")
74     String JavaDoc billToFirstName;
75
76     @Column(name = "billtolastname")
77     String JavaDoc billToLastName;
78
79     @Column(name = "shiptofirstname")
80     String JavaDoc shipToFirstName;
81
82     @Column(name = "shiptolastname")
83     String JavaDoc shipToLastName;
84
85     @Column(name = "creditcard")
86     String JavaDoc creditCard;
87
88     @Column(name = "exprdate")
89     String JavaDoc expiryDate;
90
91     @Column(name = "cardtype")
92     String JavaDoc cardType;
93
94     @Column(name = "locale")
95     String JavaDoc locale;
96
97
98     // orderstatus table
99
@Column(name = "status")
100     String JavaDoc status;
101
102     //MappedColumn
103
@MappingColumn(namedQuery = OrderDAOImpl.GET_LINEITEMS_BY_ORDERID, params = {@ParameterMap(name = "orderid", value = "$this.getOrderId()")})
104     List JavaDoc<LineItem> lineItems;
105
106
107     public long getOrderId() {
108         return orderId;
109     }
110
111     public void setOrderId(long orderId) {
112         this.orderId = orderId;
113     }
114
115     public String JavaDoc getUsername() {
116         return username;
117     }
118
119     public void setUsername(String JavaDoc username) {
120         this.username = username;
121     }
122
123     public Date JavaDoc getOrderDate() {
124         return orderDate;
125     }
126
127     public void setOrderDate(Date JavaDoc orderDate) {
128         this.orderDate = orderDate;
129     }
130
131     public String JavaDoc getShipAddress1() {
132         return shipAddress1;
133     }
134
135     public void setShipAddress1(String JavaDoc shipAddress1) {
136         this.shipAddress1 = shipAddress1;
137     }
138
139     public String JavaDoc getShipAddress2() {
140         return shipAddress2;
141     }
142
143     public void setShipAddress2(String JavaDoc shipAddress2) {
144         this.shipAddress2 = shipAddress2;
145     }
146
147     public String JavaDoc getShipCity() {
148         return shipCity;
149     }
150
151     public void setShipCity(String JavaDoc shipCity) {
152         this.shipCity = shipCity;
153     }
154
155     public String JavaDoc getShipState() {
156         return shipState;
157     }
158
159     public void setShipState(String JavaDoc shipState) {
160         this.shipState = shipState;
161     }
162
163     public String JavaDoc getShipZip() {
164         return shipZip;
165     }
166
167     public void setShipZip(String JavaDoc shipZip) {
168         this.shipZip = shipZip;
169     }
170
171     public String JavaDoc getShipCountry() {
172         return shipCountry;
173     }
174
175     public void setShipCountry(String JavaDoc shipCountry) {
176         this.shipCountry = shipCountry;
177     }
178
179     public String JavaDoc getBillAddress1() {
180         return billAddress1;
181     }
182
183     public void setBillAddress1(String JavaDoc billAddress1) {
184         this.billAddress1 = billAddress1;
185     }
186
187     public String JavaDoc getBillAddress2() {
188         return billAddress2;
189     }
190
191     public void setBillAddress2(String JavaDoc billAddress2) {
192         this.billAddress2 = billAddress2;
193     }
194
195     public String JavaDoc getBillCity() {
196         return billCity;
197     }
198
199     public void setBillCity(String JavaDoc billCity) {
200         this.billCity = billCity;
201     }
202
203     public String JavaDoc getBillState() {
204         return billState;
205     }
206
207     public void setBillState(String JavaDoc billState) {
208         this.billState = billState;
209     }
210
211     public String JavaDoc getBillZip() {
212         return billZip;
213     }
214
215     public void setBillZip(String JavaDoc billZip) {
216         this.billZip = billZip;
217     }
218
219     public String JavaDoc getBillCountry() {
220         return billCountry;
221     }
222
223     public void setBillCountry(String JavaDoc billCountry) {
224         this.billCountry = billCountry;
225     }
226
227     public String JavaDoc getCourier() {
228         return courier;
229     }
230
231     public void setCourier(String JavaDoc courier) {
232         this.courier = courier;
233     }
234
235     public double getTotalPrice() {
236         return totalPrice;
237     }
238
239     public void setTotalPrice(double totalPrice) {
240         this.totalPrice = totalPrice;
241     }
242
243     public String JavaDoc getBillToFirstName() {
244         return billToFirstName;
245     }
246
247     public void setBillToFirstName(String JavaDoc billToFirstName) {
248         this.billToFirstName = billToFirstName;
249     }
250
251     public String JavaDoc getBillToLastName() {
252         return billToLastName;
253     }
254
255     public void setBillToLastName(String JavaDoc billToLastName) {
256         this.billToLastName = billToLastName;
257     }
258
259     public String JavaDoc getShipToFirstName() {
260         return shipToFirstName;
261     }
262
263     public void setShipToFirstName(String JavaDoc shipToFirstName) {
264         this.shipToFirstName = shipToFirstName;
265     }
266
267     public String JavaDoc getShipToLastName() {
268         return shipToLastName;
269     }
270
271     public void setShipToLastName(String JavaDoc shipToLastName) {
272         this.shipToLastName = shipToLastName;
273     }
274
275     public String JavaDoc getCreditCard() {
276         return creditCard;
277     }
278
279     public void setCreditCard(String JavaDoc creditCard) {
280         this.creditCard = creditCard;
281     }
282
283     public String JavaDoc getExpiryDate() {
284         return expiryDate;
285     }
286
287     public void setExpiryDate(String JavaDoc expiryDate) {
288         this.expiryDate = expiryDate;
289     }
290
291     public String JavaDoc getCardType() {
292         return cardType;
293     }
294
295     public void setCardType(String JavaDoc cardType) {
296         this.cardType = cardType;
297     }
298
299     public String JavaDoc getLocale() {
300         return locale;
301     }
302
303     public void setLocale(String JavaDoc locale) {
304         this.locale = locale;
305     }
306
307     public String JavaDoc getStatus() {
308         return status;
309     }
310
311     public void setStatus(String JavaDoc status) {
312         this.status = status;
313     }
314
315     public List JavaDoc<LineItem> getLineItems() {
316         return lineItems;
317     }
318
319     public void setLineItems(List JavaDoc<LineItem> lineItems) {
320         this.lineItems = lineItems;
321     }
322 }
323
Popular Tags