KickJava   Java API By Example, From Geeks To Geeks.

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


1 package johnmammen.betterpetshop.bo;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.Set JavaDoc;
5 import org.apache.commons.lang.builder.ToStringBuilder;
6
7
8 /**
9  * @hibernate.class
10  * table="categorydetails"
11  *
12 */

13 public class Categorydetail implements Serializable JavaDoc {
14
15     /** identifier field */
16     private String JavaDoc catid;
17
18     /** persistent field */
19     private String JavaDoc name;
20
21     /** persistent field */
22     private Set JavaDoc products;
23
24     /** full constructor */
25     public Categorydetail(String JavaDoc catid, String JavaDoc name, Set JavaDoc products) {
26         this.catid = catid;
27         this.name = name;
28         this.products = products;
29     }
30
31     /** default constructor */
32     public Categorydetail() {
33     }
34
35     /**
36      * @hibernate.id
37      * generator-class="assigned"
38      * type="java.lang.String"
39      * column="catid"
40      *
41      */

42     public String JavaDoc getCatid() {
43         return this.catid;
44     }
45
46     public void setCatid(String JavaDoc catid) {
47         this.catid = catid;
48     }
49
50     /**
51      * @hibernate.property
52      * column="name"
53      * length="80"
54      * not-null="true"
55      *
56      */

57     public String JavaDoc getName() {
58         return this.name;
59     }
60
61     public void setName(String JavaDoc name) {
62         this.name = name;
63     }
64
65     /**
66      * @hibernate.set
67      * lazy="true"
68      * inverse="true"
69      * @hibernate.collection-key
70      * column="catid"
71      * @hibernate.collection-one-to-many
72      * class="johnmammen.betterpetshop.bo.Product"
73      *
74      */

75     public Set JavaDoc getProducts() {
76         return this.products;
77     }
78
79     public void setProducts(Set JavaDoc products) {
80         this.products = products;
81     }
82
83     public String JavaDoc toString() {
84         return new ToStringBuilder(this)
85             .append("catid", getCatid())
86             .toString();
87     }
88
89 }
90
Popular Tags