KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > johnmammen > betterpetshop > bo > Order


1 package johnmammen.betterpetshop.bo;
2
3 import java.io.Serializable JavaDoc;
4 import java.math.BigDecimal JavaDoc;
5 import java.util.Date JavaDoc;
6 import java.util.Set JavaDoc;
7 import org.apache.commons.lang.builder.ToStringBuilder;
8 import org.apache.tapestry.pets.domain.model.*;
9
10
11 /**
12  * @hibernate.class
13  * table="orders"
14  *
15 */

16 public class Order implements Serializable JavaDoc {
17
18     /** identifier field */
19     private String JavaDoc orderid;
20
21     /** nullable persistent field */
22     private Date JavaDoc orderdate;
23
24     /** persistent field */
25     private String JavaDoc shiptofirstname;
26
27     /** persistent field */
28     private String JavaDoc shiptolastname;
29
30     /** persistent field */
31     private String JavaDoc shiptoaddress1;
32
33     /** persistent field */
34     private String JavaDoc shiptoaddress2;
35
36     /** persistent field */
37     private String JavaDoc shiptocity;
38
39     /** nullable persistent field */
40     private String JavaDoc shiptostate;
41
42     /** persistent field */
43     private String JavaDoc shiptozip;
44
45     /** persistent field */
46     private String JavaDoc shiptocountry;
47
48     /** nullable persistent field */
49     private String JavaDoc shiptophonenumber;
50
51     /** persistent field */
52     private String JavaDoc billtofirstname;
53
54     /** nullable persistent field */
55     private String JavaDoc billtolastname;
56
57     /** nullable persistent field */
58     private String JavaDoc billtoaddress1;
59
60     /** nullable persistent field */
61     private String JavaDoc billtoaddress2;
62
63     /** nullable persistent field */
64     private String JavaDoc billtocity;
65
66     /** nullable persistent field */
67     private String JavaDoc billtostate;
68
69     /** persistent field */
70     private String JavaDoc billtopostalcode;
71
72     /** persistent field */
73     private String JavaDoc billtocountry;
74
75     /** nullable persistent field */
76     private String JavaDoc billtophonenumber;
77
78     /** nullable persistent field */
79     private BigDecimal JavaDoc totalprice;
80
81     /** persistent field */
82     private String JavaDoc cardtype;
83
84     /** persistent field */
85     private String JavaDoc cardnumber;
86
87     /** persistent field */
88     private String JavaDoc cardexpiremonth;
89
90     /** persistent field */
91     private String JavaDoc cardexpireyear;
92
93     /** persistent field */
94     private String JavaDoc locale;
95
96     /** persistent field */
97     private ICustomer useraccount;
98
99     /** persistent field */
100     private Set JavaDoc lineitems;
101
102     /** full constructor */
103     public Order(String JavaDoc orderid, Date JavaDoc orderdate, String JavaDoc shiptofirstname, String JavaDoc shiptolastname, String JavaDoc shiptoaddress1, String JavaDoc shiptoaddress2, String JavaDoc shiptocity, String JavaDoc shiptostate, String JavaDoc shiptozip, String JavaDoc shiptocountry, String JavaDoc shiptophonenumber, String JavaDoc billtofirstname, String JavaDoc billtolastname, String JavaDoc billtoaddress1, String JavaDoc billtoaddress2, String JavaDoc billtocity, String JavaDoc billtostate, String JavaDoc billtopostalcode, String JavaDoc billtocountry, String JavaDoc billtophonenumber, BigDecimal JavaDoc totalprice, String JavaDoc cardtype, String JavaDoc cardnumber, String JavaDoc cardexpiremonth, String JavaDoc cardexpireyear, String JavaDoc locale,ICustomer useraccount, Set JavaDoc lineitems) {
104         this.orderid = orderid;
105         this.orderdate = orderdate;
106         this.shiptofirstname = shiptofirstname;
107         this.shiptolastname = shiptolastname;
108         this.shiptoaddress1 = shiptoaddress1;
109         this.shiptoaddress2 = shiptoaddress2;
110         this.shiptocity = shiptocity;
111         this.shiptostate = shiptostate;
112         this.shiptozip = shiptozip;
113         this.shiptocountry = shiptocountry;
114         this.shiptophonenumber = shiptophonenumber;
115         this.billtofirstname = billtofirstname;
116         this.billtolastname = billtolastname;
117         this.billtoaddress1 = billtoaddress1;
118         this.billtoaddress2 = billtoaddress2;
119         this.billtocity = billtocity;
120         this.billtostate = billtostate;
121         this.billtopostalcode = billtopostalcode;
122         this.billtocountry = billtocountry;
123         this.billtophonenumber = billtophonenumber;
124         this.totalprice = totalprice;
125         this.cardtype = cardtype;
126         this.cardnumber = cardnumber;
127         this.cardexpiremonth = cardexpiremonth;
128         this.cardexpireyear = cardexpireyear;
129         this.locale = locale;
130         this.useraccount = useraccount;
131         this.lineitems = lineitems;
132     }
133
134     /** default constructor */
135     public Order() {
136     }
137
138     /** minimal constructor */
139     public Order(String JavaDoc orderid, String JavaDoc shiptofirstname, String JavaDoc shiptolastname, String JavaDoc shiptoaddress1, String JavaDoc shiptoaddress2, String JavaDoc shiptocity, String JavaDoc shiptozip, String JavaDoc shiptocountry, String JavaDoc billtofirstname, String JavaDoc billtopostalcode, String JavaDoc billtocountry, String JavaDoc cardtype, String JavaDoc cardnumber, String JavaDoc cardexpiremonth, String JavaDoc cardexpireyear, String JavaDoc locale,ICustomer useraccount, Set JavaDoc lineitems) {
140         this.orderid = orderid;
141         this.shiptofirstname = shiptofirstname;
142         this.shiptolastname = shiptolastname;
143         this.shiptoaddress1 = shiptoaddress1;
144         this.shiptoaddress2 = shiptoaddress2;
145         this.shiptocity = shiptocity;
146         this.shiptozip = shiptozip;
147         this.shiptocountry = shiptocountry;
148         this.billtofirstname = billtofirstname;
149         this.billtopostalcode = billtopostalcode;
150         this.billtocountry = billtocountry;
151         this.cardtype = cardtype;
152         this.cardnumber = cardnumber;
153         this.cardexpiremonth = cardexpiremonth;
154         this.cardexpireyear = cardexpireyear;
155         this.locale = locale;
156         this.useraccount = useraccount;
157         this.lineitems = lineitems;
158     }
159
160     /**
161      * @hibernate.id
162      * generator-class="assigned"
163      * type="java.lang.String"
164      * column="orderid"
165      *
166      */

167     public String JavaDoc getOrderid() {
168         return this.orderid;
169     }
170
171     public void setOrderid(String JavaDoc orderid) {
172         this.orderid = orderid;
173     }
174
175     /**
176      * @hibernate.property
177      * column="orderdate"
178      * length="19"
179      *
180      */

181     public Date JavaDoc getOrderdate() {
182         return this.orderdate;
183     }
184
185     public void setOrderdate(Date JavaDoc orderdate) {
186         this.orderdate = orderdate;
187     }
188
189     /**
190      * @hibernate.property
191      * column="shiptofirstname"
192      * length="80"
193      * not-null="true"
194      *
195      */

196     public String JavaDoc getShiptofirstname() {
197         return this.shiptofirstname;
198     }
199
200     public void setShiptofirstname(String JavaDoc shiptofirstname) {
201         this.shiptofirstname = shiptofirstname;
202     }
203
204     /**
205      * @hibernate.property
206      * column="shiptolastname"
207      * length="80"
208      * not-null="true"
209      *
210      */

211     public String JavaDoc getShiptolastname() {
212         return this.shiptolastname;
213     }
214
215     public void setShiptolastname(String JavaDoc shiptolastname) {
216         this.shiptolastname = shiptolastname;
217     }
218
219     /**
220      * @hibernate.property
221      * column="shiptoaddress1"
222      * length="80"
223      * not-null="true"
224      *
225      */

226     public String JavaDoc getShiptoaddress1() {
227         return this.shiptoaddress1;
228     }
229
230     public void setShiptoaddress1(String JavaDoc shiptoaddress1) {
231         this.shiptoaddress1 = shiptoaddress1;
232     }
233
234     /**
235      * @hibernate.property
236      * column="shiptoaddress2"
237      * length="80"
238      * not-null="true"
239      *
240      */

241     public String JavaDoc getShiptoaddress2() {
242         return this.shiptoaddress2;
243     }
244
245     public void setShiptoaddress2(String JavaDoc shiptoaddress2) {
246         this.shiptoaddress2 = shiptoaddress2;
247     }
248
249     /**
250      * @hibernate.property
251      * column="shiptocity"
252      * length="80"
253      * not-null="true"
254      *
255      */

256     public String JavaDoc getShiptocity() {
257         return this.shiptocity;
258     }
259
260     public void setShiptocity(String JavaDoc shiptocity) {
261         this.shiptocity = shiptocity;
262     }
263
264     /**
265      * @hibernate.property
266      * column="shiptostate"
267      * length="80"
268      *
269      */

270     public String JavaDoc getShiptostate() {
271         return this.shiptostate;
272     }
273
274     public void setShiptostate(String JavaDoc shiptostate) {
275         this.shiptostate = shiptostate;
276     }
277
278     /**
279      * @hibernate.property
280      * column="shiptozip"
281      * length="20"
282      * not-null="true"
283      *
284      */

285     public String JavaDoc getShiptozip() {
286         return this.shiptozip;
287     }
288
289     public void setShiptozip(String JavaDoc shiptozip) {
290         this.shiptozip = shiptozip;
291     }
292
293     /**
294      * @hibernate.property
295      * column="shiptocountry"
296      * length="80"
297      * not-null="true"
298      *
299      */

300     public String JavaDoc getShiptocountry() {
301         return this.shiptocountry;
302     }
303
304     public void setShiptocountry(String JavaDoc shiptocountry) {
305         this.shiptocountry = shiptocountry;
306     }
307
308     /**
309      * @hibernate.property
310      * column="shiptophonenumber"
311      * length="80"
312      *
313      */

314     public String JavaDoc getShiptophonenumber() {
315         return this.shiptophonenumber;
316     }
317
318     public void setShiptophonenumber(String JavaDoc shiptophonenumber) {
319         this.shiptophonenumber = shiptophonenumber;
320     }
321
322     /**
323      * @hibernate.property
324      * column="billtofirstname"
325      * length="80"
326      * not-null="true"
327      *
328      */

329     public String JavaDoc getBilltofirstname() {
330         return this.billtofirstname;
331     }
332
333     public void setBilltofirstname(String JavaDoc billtofirstname) {
334         this.billtofirstname = billtofirstname;
335     }
336
337     /**
338      * @hibernate.property
339      * column="billtolastname"
340      * length="80"
341      *
342      */

343     public String JavaDoc getBilltolastname() {
344         return this.billtolastname;
345     }
346
347     public void setBilltolastname(String JavaDoc billtolastname) {
348         this.billtolastname = billtolastname;
349     }
350
351     /**
352      * @hibernate.property
353      * column="billtoaddress1"
354      * length="80"
355      *
356      */

357     public String JavaDoc getBilltoaddress1() {
358         return this.billtoaddress1;
359     }
360
361     public void setBilltoaddress1(String JavaDoc billtoaddress1) {
362         this.billtoaddress1 = billtoaddress1;
363     }
364
365     /**
366      * @hibernate.property
367      * column="billtoaddress2"
368      * length="80"
369      *
370      */

371     public String JavaDoc getBilltoaddress2() {
372         return this.billtoaddress2;
373     }
374
375     public void setBilltoaddress2(String JavaDoc billtoaddress2) {
376         this.billtoaddress2 = billtoaddress2;
377     }
378
379     /**
380      * @hibernate.property
381      * column="billtocity"
382      * length="80"
383      *
384      */

385     public String JavaDoc getBilltocity() {
386         return this.billtocity;
387     }
388
389     public void setBilltocity(String JavaDoc billtocity) {
390         this.billtocity = billtocity;
391     }
392
393     /**
394      * @hibernate.property
395      * column="billtostate"
396      * length="80"
397      *
398      */

399     public String JavaDoc getBilltostate() {
400         return this.billtostate;
401     }
402
403     public void setBilltostate(String JavaDoc billtostate) {
404         this.billtostate = billtostate;
405     }
406
407     /**
408      * @hibernate.property
409      * column="billtopostalcode"
410      * length="20"
411      * not-null="true"
412      *
413      */

414     public String JavaDoc getBilltopostalcode() {
415         return this.billtopostalcode;
416     }
417
418     public void setBilltopostalcode(String JavaDoc billtopostalcode) {
419         this.billtopostalcode = billtopostalcode;
420     }
421
422     /**
423      * @hibernate.property
424      * column="billtocountry"
425      * length="80"
426      * not-null="true"
427      *
428      */

429     public String JavaDoc getBilltocountry() {
430         return this.billtocountry;
431     }
432
433     public void setBilltocountry(String JavaDoc billtocountry) {
434         this.billtocountry = billtocountry;
435     }
436
437     /**
438      * @hibernate.property
439      * column="billtophonenumber"
440      * length="80"
441      *
442      */

443     public String JavaDoc getBilltophonenumber() {
444         return this.billtophonenumber;
445     }
446
447     public void setBilltophonenumber(String JavaDoc billtophonenumber) {
448         this.billtophonenumber = billtophonenumber;
449     }
450
451     /**
452      * @hibernate.property
453      * column="totalprice"
454      * length="10"
455      *
456      */

457     public BigDecimal JavaDoc getTotalprice() {
458         return this.totalprice;
459     }
460
461     public void setTotalprice(BigDecimal JavaDoc totalprice) {
462         this.totalprice = totalprice;
463     }
464
465     /**
466      * @hibernate.property
467      * column="cardtype"
468      * length="20"
469      * not-null="true"
470      *
471      */

472     public String JavaDoc getCardtype() {
473         return this.cardtype;
474     }
475
476     public void setCardtype(String JavaDoc cardtype) {
477         this.cardtype = cardtype;
478     }
479
480     /**
481      * @hibernate.property
482      * column="cardnumber"
483      * length="80"
484      * not-null="true"
485      *
486      */

487     public String JavaDoc getCardnumber() {
488         return this.cardnumber;
489     }
490
491     public void setCardnumber(String JavaDoc cardnumber) {
492         this.cardnumber = cardnumber;
493     }
494
495     /**
496      * @hibernate.property
497      * column="cardexpiremonth"
498      * length="65535"
499      * not-null="true"
500      *
501      */

502     public String JavaDoc getCardexpiremonth() {
503         return this.cardexpiremonth;
504     }
505
506     public void setCardexpiremonth(String JavaDoc cardexpiremonth) {
507         this.cardexpiremonth = cardexpiremonth;
508     }
509
510     /**
511      * @hibernate.property
512      * column="cardexpireyear"
513      * length="65535"
514      * not-null="true"
515      *
516      */

517     public String JavaDoc getCardexpireyear() {
518         return this.cardexpireyear;
519     }
520
521     public void setCardexpireyear(String JavaDoc cardexpireyear) {
522         this.cardexpireyear = cardexpireyear;
523     }
524
525     /**
526      * @hibernate.property
527      * column="locale"
528      * length="65535"
529      * not-null="true"
530      *
531      */

532     public String JavaDoc getLocale() {
533         return this.locale;
534     }
535
536     public void setLocale(String JavaDoc locale) {
537         this.locale = locale;
538     }
539
540     /**
541      * @hibernate.many-to-one
542      * not-null="true"
543      * @hibernate.column name="userid"
544      *
545      */

546     public ICustomer getUseraccount() {
547         return this.useraccount;
548     }
549
550     public void setUseraccount(ICustomer useraccount) {
551         this.useraccount = useraccount;
552     }
553
554     /**
555      * @hibernate.set
556      * lazy="true"
557      * @hibernate.collection-key
558      * column="orderid"
559      * @hibernate.collection-one-to-many
560      * class="johnmammen.betterpetshop.bo.Lineitem"
561      *
562      */

563     public Set JavaDoc getLineitems() {
564         return this.lineitems;
565     }
566
567     public void setLineitems(Set JavaDoc lineitems) {
568         this.lineitems = lineitems;
569     }
570
571     public String JavaDoc toString() {
572         return new ToStringBuilder(this)
573             .append("orderid", getOrderid())
574             .toString();
575     }
576
577 }
578
Popular Tags