KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > javabb > vo > AnswerNotify


1 package org.javabb.vo;
2
3 import java.io.Serializable JavaDoc;
4 import org.apache.commons.lang.builder.EqualsBuilder;
5 import org.apache.commons.lang.builder.HashCodeBuilder;
6 import org.apache.commons.lang.builder.ToStringBuilder;
7
8 /**
9  * @hibernate.class
10  * table="jbb_answer_notify"
11  *
12 */

13 public class AnswerNotify implements Serializable JavaDoc {
14
15     /** identifier field */
16     private org.javabb.vo.AnswerNotifyPK comp_id;
17
18     /** nullable persistent field */
19     private org.javabb.vo.User user;
20
21     /** nullable persistent field */
22     private org.javabb.vo.Topic topic;
23
24     /** full constructor */
25     public AnswerNotify(org.javabb.vo.AnswerNotifyPK comp_id, org.javabb.vo.User user, org.javabb.vo.Topic topic) {
26         this.comp_id = comp_id;
27         this.user = user;
28         this.topic = topic;
29     }
30
31     /** default constructor */
32     public AnswerNotify() {
33     }
34
35     /** minimal constructor */
36     public AnswerNotify(org.javabb.vo.AnswerNotifyPK comp_id) {
37         this.comp_id = comp_id;
38     }
39
40     /**
41      * @hibernate.id
42      * generator-class="assigned"
43      *
44      */

45     public org.javabb.vo.AnswerNotifyPK getComp_id() {
46         return this.comp_id;
47     }
48
49     public void setComp_id(org.javabb.vo.AnswerNotifyPK comp_id) {
50         this.comp_id = comp_id;
51     }
52
53     /**
54      * @hibernate.many-to-one
55      * update="false"
56      * insert="false"
57      *
58      * @hibernate.column
59      * name="id_user"
60      *
61      */

62     public org.javabb.vo.User getUser() {
63         return this.user;
64     }
65
66     public void setUser(org.javabb.vo.User user) {
67         this.user = user;
68     }
69
70     /**
71      * @hibernate.many-to-one
72      * update="false"
73      * insert="false"
74      *
75      * @hibernate.column
76      * name="id_topic"
77      *
78      */

79     public org.javabb.vo.Topic getTopic() {
80         return this.topic;
81     }
82
83     public void setTopic(org.javabb.vo.Topic topic) {
84         this.topic = topic;
85     }
86
87     public String JavaDoc toString() {
88         return new ToStringBuilder(this)
89             .append("comp_id", getComp_id())
90             .toString();
91     }
92
93     public boolean equals(Object JavaDoc other) {
94         if ( !(other instanceof AnswerNotify) ) return false;
95         AnswerNotify castOther = (AnswerNotify) other;
96         return new EqualsBuilder()
97             .append(this.getComp_id(), castOther.getComp_id())
98             .isEquals();
99     }
100
101     public int hashCode() {
102         return new HashCodeBuilder()
103             .append(getComp_id())
104             .toHashCode();
105     }
106
107 }
108
Popular Tags