KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xpetstore > web > struts > action > cart > CartForm


1 package xpetstore.web.struts.action.cart;
2
3 import java.util.Collection JavaDoc;
4
5 import xpetstore.domain.customer.ejb.Customer;
6
7 import xpetstore.web.struts.action.*;
8
9
10 /**
11  * @author <a HREF="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
12  *
13  * @struts.form
14  * name="cartForm"
15  */

16 public class CartForm
17     extends BaseForm
18 {
19     //~ Instance fields --------------------------------------------------------
20

21     private Collection JavaDoc _cartItems;
22     private Customer _customer;
23     private String JavaDoc _itemId[];
24     private int _quantity[];
25     public double _total;
26
27     //~ Methods ----------------------------------------------------------------
28

29     public Collection JavaDoc getCartItems( )
30     {
31         return _cartItems;
32     }
33
34     /**
35      * @return CustomerValue
36      */

37     public Customer getCustomer( )
38     {
39         return _customer;
40     }
41
42     public String JavaDoc[] getItemId( )
43     {
44         return _itemId;
45     }
46
47     public int[] getQuantity( )
48     {
49         return _quantity;
50     }
51
52     public double getTotal( )
53     {
54         return _total;
55     }
56
57     public void setCartItems( Collection JavaDoc cartItems )
58     {
59         _cartItems = cartItems;
60     }
61
62     /**
63      * Sets the customer.
64      * @param customer The customer to set
65      */

66     public void setCustomer( Customer customer )
67     {
68         _customer = customer;
69     }
70
71     public void setItemId( String JavaDoc itemId[] )
72     {
73         _itemId = itemId;
74     }
75
76     public void setQuantity( int quantity[] )
77     {
78         _quantity = quantity;
79     }
80
81     public void setTotal( double total )
82     {
83         _total = total;
84     }
85 }
86
Popular Tags