KickJava   Java API By Example, From Geeks To Geeks.

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


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_fav_topic"
11  *
12 */

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

52     public org.javabb.vo.FavUserTopicPK getComp_id() {
53         return this.comp_id;
54     }
55
56     public void setComp_id(org.javabb.vo.FavUserTopicPK comp_id) {
57         this.comp_id = comp_id;
58     }
59
60     /**
61      * @hibernate.many-to-one
62      * update="false"
63      * insert="false"
64      *
65      * @hibernate.column
66      * name="id_user"
67      *
68      */

69     public org.javabb.vo.User getUser() {
70         return this.user;
71     }
72
73     public void setUser(org.javabb.vo.User user) {
74         this.user = user;
75     }
76
77     /**
78      * @hibernate.many-to-one
79      * update="false"
80      * insert="false"
81      *
82      * @hibernate.column
83      * name="id_topic"
84      *
85      */

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