KickJava   Java API By Example, From Geeks To Geeks.

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


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

12 public class Productdetail implements Serializable JavaDoc {
13
14     /** identifier field */
15     private String JavaDoc productid;
16
17     /** persistent field */
18     private String JavaDoc name;
19
20     /** persistent field */
21     private String JavaDoc descn;
22
23     /** nullable persistent field */
24     private org.apache.tapestry.pets.domain.model.IProduct product;
25
26     /** full constructor */
27     public Productdetail(String JavaDoc productid, String JavaDoc name, String JavaDoc descn, org.apache.tapestry.pets.domain.model.IProduct product) {
28         this.productid = productid;
29         this.name = name;
30         this.descn = descn;
31         this.product = product;
32     }
33
34     /** default constructor */
35     public Productdetail() {
36     }
37
38     /** minimal constructor */
39     public Productdetail(String JavaDoc productid, String JavaDoc name, String JavaDoc descn) {
40         this.productid = productid;
41         this.name = name;
42         this.descn = descn;
43     }
44
45     /**
46      * @hibernate.id
47      * generator-class="assigned"
48      * type="java.lang.String"
49      * column="productid"
50      *
51      */

52     public String JavaDoc getProductid() {
53         return this.productid;
54     }
55
56     public void setProductid(String JavaDoc productid) {
57         this.productid = productid;
58     }
59
60     /**
61      * @hibernate.property
62      * column="name"
63      * length="80"
64      * not-null="true"
65      *
66      */

67     public String JavaDoc getName() {
68         return this.name;
69     }
70
71     public void setName(String JavaDoc name) {
72         this.name = name;
73     }
74
75     /**
76      * @hibernate.property
77      * column="descn"
78      * length="255"
79      * not-null="true"
80      *
81      */

82     public String JavaDoc getDescn() {
83         return this.descn;
84     }
85
86     public void setDescn(String JavaDoc descn) {
87         this.descn = descn;
88     }
89
90     /**
91      * @hibernate.one-to-one
92      * class="johnmammen.betterpetshop.bo.Product"
93      * outer-join="auto"
94      * constrained="true"
95      *
96      */

97     public org.apache.tapestry.pets.domain.model.IProduct getProduct() {
98         return this.product;
99     }
100
101     public void setProduct(org.apache.tapestry.pets.domain.model.IProduct product) {
102         this.product = product;
103     }
104
105     public String JavaDoc toString() {
106         return new ToStringBuilder(this)
107             .append("productid", getProductid())
108             .toString();
109     }
110
111 }
112
Popular Tags