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 13 public class FavUserTopic implements Serializable { 14 15 private static final long serialVersionUID = 1L; 16 17 18 private org.javabb.vo.FavUserTopicPK comp_id; 19 20 21 private org.javabb.vo.User user; 22 23 24 private org.javabb.vo.Topic topic; 25 26 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 39 public FavUserTopic() { 40 } 41 42 43 public FavUserTopic(org.javabb.vo.FavUserTopicPK comp_id) { 44 this.comp_id = comp_id; 45 } 46 47 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 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 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 toString() { 95 return new ToStringBuilder(this) 96 .append("comp_id", getComp_id()) 97 .toString(); 98 } 99 100 public boolean equals(Object 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 |