1 package org.javabb.vo; 2 3 import java.io.Serializable ; 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 public class AnswerNotifyPK implements Serializable { 10 11 12 private Long idTopic; 13 14 15 private Long idUser; 16 17 18 public AnswerNotifyPK(Long idTopic, Long idUser) { 19 this.idTopic = idTopic; 20 this.idUser = idUser; 21 } 22 23 24 public AnswerNotifyPK() { 25 } 26 27 32 public Long getIdTopic() { 33 return this.idTopic; 34 } 35 36 public void setIdTopic(Long idTopic) { 37 this.idTopic = idTopic; 38 } 39 40 45 public Long getIdUser() { 46 return this.idUser; 47 } 48 49 public void setIdUser(Long idUser) { 50 this.idUser = idUser; 51 } 52 53 public String toString() { 54 return new ToStringBuilder(this) 55 .append("idTopic", getIdTopic()) 56 .append("idUser", getIdUser()) 57 .toString(); 58 } 59 60 public boolean equals(Object 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 |