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 FavUserTopicPK implements Serializable { 10 11 14 private static final long serialVersionUID = 1L; 15 16 17 private Long idTopic; 18 19 20 private Long idUser; 21 22 23 public FavUserTopicPK(Long idTopic, Long idUser) { 24 this.idTopic = idTopic; 25 this.idUser = idUser; 26 } 27 28 29 public FavUserTopicPK() { 30 } 31 32 37 public Long getIdTopic() { 38 return this.idTopic; 39 } 40 41 public void setIdTopic(Long idTopic) { 42 this.idTopic = idTopic; 43 } 44 45 50 public Long getIdUser() { 51 return this.idUser; 52 } 53 54 public void setIdUser(Long idUser) { 55 this.idUser = idUser; 56 } 57 58 public String toString() { 59 return new ToStringBuilder(this) 60 .append("idTopic", getIdTopic()) 61 .append("idUser", getIdUser()) 62 .toString(); 63 } 64 65 public boolean equals(Object 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 |