KickJava   Java API By Example, From Geeks To Geeks.

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


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 /** @author Hibernate CodeGenerator */
9 public class FavUserTopicPK implements Serializable JavaDoc {
10
11     /**
12      *
13      */

14     private static final long serialVersionUID = 1L;
15
16     /** identifier field */
17     private Long JavaDoc idTopic;
18
19     /** identifier field */
20     private Long JavaDoc idUser;
21
22     /** full constructor */
23     public FavUserTopicPK(Long JavaDoc idTopic, Long JavaDoc idUser) {
24         this.idTopic = idTopic;
25         this.idUser = idUser;
26     }
27
28     /** default constructor */
29     public FavUserTopicPK() {
30     }
31
32     /**
33      * @hibernate.property
34      * column="id_topic"
35      *
36      */

37     public Long JavaDoc getIdTopic() {
38         return this.idTopic;
39     }
40
41     public void setIdTopic(Long JavaDoc idTopic) {
42         this.idTopic = idTopic;
43     }
44
45     /**
46      * @hibernate.property
47      * column="id_user"
48      *
49      */

50     public Long JavaDoc getIdUser() {
51         return this.idUser;
52     }
53
54     public void setIdUser(Long JavaDoc idUser) {
55         this.idUser = idUser;
56     }
57
58     public String JavaDoc toString() {
59         return new ToStringBuilder(this)
60             .append("idTopic", getIdTopic())
61             .append("idUser", getIdUser())
62             .toString();
63     }
64
65     public boolean equals(Object JavaDoc other) {
66         if ( !(other instanceof FavUserTopicPK) ) return false;
67         FavUserTopicPK castOther = (FavUserTopicPK) other;
68         return new EqualsBuilder()
69             .append(this.getIdTopic(), castOther.getIdTopic())
70             .append(this.getIdUser(), castOther.getIdUser())
71             .isEquals();
72     }
73
74     public int hashCode() {
75         return new HashCodeBuilder()
76             .append(getIdTopic())
77             .append(getIdUser())
78             .toHashCode();
79     }
80
81 }
82
Popular Tags