KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > xpetstore > domain > Product


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

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

17 public class Product
18     implements Serializable JavaDoc
19 {
20     //~ Instance fields --------------------------------------------------------
21

22     private String JavaDoc _productId;
23     private String JavaDoc _name;
24     private String JavaDoc _description;
25     private Set JavaDoc _items;
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 Set
42      *
43      * @hibernate.set
44      * role="items"
45      * lazy="true"
46      * cascade="delete"
47      * @hibernate.collection-key
48      * column="product_fk"
49      * @hibernate.collection-one-to-many
50      * class="xpetstore.domain.Item"
51      */

52     public Set JavaDoc getItems( )
53     {
54         return _items;
55     }
56
57     /**
58      * @return String
59      *
60      * @hibernate.property
61      * length="50"
62      */

63     public String JavaDoc getName( )
64     {
65         return _name;
66     }
67
68     /**
69      * @return String
70      *
71      * @hibernate.id
72      * generator-class="assigned"
73      * length="10"
74      */

75     public String JavaDoc getProductId( )
76     {
77         return _productId;
78     }
79
80     /**
81      * Sets the description.
82      * @param description The description to set
83      */

84     public void setDescription( String JavaDoc description )
85     {
86         _description = description;
87     }
88
89     /**
90      * Sets the items.
91      * @param items The items to set
92      */

93     public void setItems( Set JavaDoc items )
94     {
95         _items = items;
96     }
97
98     /**
99      * Sets the name.
100      * @param name The name to set
101      */

102     public void setName( String JavaDoc name )
103     {
104         _name = name;
105     }
106
107     /**
108      * Sets the productId.
109      * @param productId The productId to set
110      */

111     public void setProductId( String JavaDoc productId )
112     {
113         _productId = productId;
114     }
115 }
116
Popular Tags