KickJava   Java API By Example, From Geeks To Geeks.

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


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 AnswerNotifyPK implements Serializable JavaDoc {
10
11     /** identifier field */
12     private Long JavaDoc idTopic;
13
14     /** identifier field */
15     private Long JavaDoc idUser;
16
17     /** full constructor */
18     public AnswerNotifyPK(Long JavaDoc idTopic, Long JavaDoc idUser) {
19         this.idTopic = idTopic;
20         this.idUser = idUser;
21     }
22
23     /** default constructor */
24     public AnswerNotifyPK() {
25     }
26
27     /**
28      * @hibernate.property
29      * column="id_topic"
30      *
31      */

32     public Long JavaDoc getIdTopic() {
33         return this.idTopic;
34     }
35
36     public void setIdTopic(Long JavaDoc idTopic) {
37         this.idTopic = idTopic;
38     }
39
40     /**
41      * @hibernate.property
42      * column="id_user"
43      *
44      */

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