KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xpetstore > domain > Item


1 /*
2  * Created on Feb 22, 2003
3  */

4 package xpetstore.domain;
5
6 import java.io.Serializable JavaDoc;
7
8
9 /**
10  * @author <a HREF="mailto:tchbansi@sourceforge.net">Herve Tchepannou</a>
11  *
12  * @hibernate.class
13  * table="T_ITEM"
14  */

15 public class Item
16     implements Serializable JavaDoc
17 {
18     //~ Instance fields --------------------------------------------------------
19

20     private String JavaDoc _itemId;
21     private double _listPrice;
22     private double _unitCost;
23     private String JavaDoc _description;
24     private String JavaDoc _imagePath;
25     private Product _product;
26
27     //~ Methods ----------------------------------------------------------------
28

29     /**
30      * @return String
31      *
32      * @hibernate.property
33      * length="255"
34      */

35     public String JavaDoc getDescription( )
36     {
37         return _description;
38     }
39
40     /**
41      * @return String
42      *
43      * @hibernate.property
44      * length="255"
45      */

46     public String JavaDoc getImagePath( )
47     {
48         return _imagePath;
49     }
50
51     /**
52      * @return String
53      *
54      * @hibernate.id
55      * generator-class="assigned"
56      * length="10"
57      */

58     public String JavaDoc getItemId( )
59     {
60         return _itemId;
61     }
62
63     /**
64      * @return double
65      *
66      * @hibernate.property
67      */

68     public double getListPrice( )
69     {
70         return _listPrice;
71     }
72
73     /**
74      * @return Product
75      *
76      * @hibernate.many-to-one
77      * cascade="none"
78      * column="product_fk"
79      */

80     public Product getProduct( )
81     {
82         return _product;
83     }
84
85     /**
86      * @return double
87      *
88      * @hibernate.property
89      */

90     public double getUnitCost( )
91     {
92         return _unitCost;
93     }
94
95     /**
96      * Sets the description.
97      * @param description The description to set
98      */

99     public void setDescription( String JavaDoc description )
100     {
101         _description = description;
102     }
103
104     /**
105      * Sets the imagePath.
106      * @param imagePath The imagePath to set
107      */

108     public void setImagePath( String JavaDoc imagePath )
109     {
110         _imagePath = imagePath;
111     }
112
113     /**
114      * Sets the itemId.
115      * @param itemId The itemId to set
116      */

117     public void setItemId( String JavaDoc itemId )
118     {
119         _itemId = itemId;
120     }
121
122     /**
123      * Sets the listPrice.
124      * @param listPrice The listPrice to set
125      */

126     public void setListPrice( double listPrice )
127     {
128         _listPrice = listPrice;
129     }
130
131     /**
132      * Sets the product.
133      * @param product The product to set
134      */

135     public void setProduct( Product product )
136     {
137         _product = product;
138     }
139
140     /**
141      * Sets the unitCost.
142      * @param unitCost The unitCost to set
143      */

144     public void setUnitCost( double unitCost )
145     {
146         _unitCost = unitCost;
147     }
148 }
149
Popular Tags