1 package org.javabb.vo; 2 3 import java.io.Serializable ; 4 import java.util.Date ; 5 import java.util.HashSet ; 6 import java.util.Set ; 7 8 import org.apache.commons.lang.builder.EqualsBuilder; 9 import org.apache.commons.lang.builder.HashCodeBuilder; 10 import org.apache.commons.lang.builder.ToStringBuilder; 11 12 27 28 33 public class Forum extends VOObject implements Serializable { 34 35 36 private String nome; 37 38 39 private String descricao; 40 41 42 private Integer forumStatus; 43 44 45 private Set topics; 46 47 48 private Integer forumOrder; 49 50 private Long topicCount; 51 52 private Long postCount; 53 54 private Long lastPagePost; 55 56 private String lastPostUserName; 57 58 private Long lastPostUserId; 59 60 private Long lastPostId; 61 62 private Date lastPostDate; 63 64 private Long lastTopicId; 65 66 private Category category; 67 68 private Set forumTopUsers; 69 70 71 public Forum() { 72 } 74 75 public Forum(Long id) { 76 setIdForum(id); 77 } 78 79 85 public Forum(String name, String description, Integer sortingPosition, Integer status) { 86 this(null, name, description, sortingPosition, status, new HashSet ()); 87 } 88 89 97 public Forum(Long id, String name, String description, Integer sortingPosition, Integer status, 98 Set topics) { 99 100 setId(id); 101 setNome(name); 102 setDescricao(description); 103 setForumOrder(sortingPosition); 104 setForumStatus(status); 105 setTopics(topics); 106 } 107 108 111 public Long getIdForum() { 112 return getId(); 113 } 114 115 118 public void setIdForum(Long id) { 119 this.setId(id); 120 } 121 122 126 public String getNome() { 127 return this.nome; 128 } 129 130 133 public void setNome(String nome) { 134 this.nome = nome; 135 } 136 137 141 public String getDescricao() { 142 return this.descricao; 143 } 144 145 148 public void setDescricao(String descricao) { 149 this.descricao = descricao; 150 } 151 152 155 public Set getTopics() { 156 return this.topics; 157 } 158 159 162 public void setTopics(Set topics) { 163 this.topics = topics; 164 } 165 166 169 public String toString() { 170 return new ToStringBuilder(this).append("idForum", getIdForum()).toString(); 171 } 172 173 176 public boolean equals(Object other) { 177 if (!(other instanceof Forum)) { 178 return false; 179 } 180 181 Forum castOther = (Forum) other; 182 183 return new EqualsBuilder().append(this.getIdForum(), castOther.getIdForum()).isEquals(); 184 } 185 186 189 public int hashCode() { 190 return new HashCodeBuilder().append(getIdForum()).toHashCode(); 191 } 192 193 196 public Integer getForumStatus() { 197 return forumStatus; 198 } 199 200 203 public void setForumStatus(Integer forumStatus) { 204 this.forumStatus = forumStatus; 205 } 206 207 210 public Integer getForumOrder() { 211 return forumOrder; 212 } 213 214 217 public void setForumOrder(Integer forumOrder) { 218 this.forumOrder = forumOrder; 219 } 220 221 224 public Category getCategory() { 225 return category; 226 } 227 228 231 public void setCategory(Category category) { 232 this.category = category; 233 } 234 235 238 public Long getTopicCount() { 239 return topicCount; 240 } 241 242 245 public void setTopicCount(Long topicCount) { 246 this.topicCount = topicCount; 247 } 248 249 252 public Long getPostCount() { 253 return postCount; 254 } 255 256 259 public void setPostCount(Long postCount) { 260 this.postCount = postCount; 261 } 262 263 266 public Long getLastPagePost() { 267 return lastPagePost; 268 } 269 270 273 public void setLastPagePost(Long lastPagePost) { 274 this.lastPagePost = lastPagePost; 275 } 276 277 280 public Long getLastPostId() { 281 return lastPostId; 282 } 283 284 287 public void setLastPostId(Long lastPostId) { 288 this.lastPostId = lastPostId; 289 } 290 291 294 public Long getLastPostUserId() { 295 return lastPostUserId; 296 } 297 298 301 public void setLastPostUserId(Long lastPostUserId) { 302 this.lastPostUserId = lastPostUserId; 303 } 304 305 308 public String getLastPostUserName() { 309 return lastPostUserName; 310 } 311 312 315 public void setLastPostUserName(String lastPostUserName) { 316 this.lastPostUserName = lastPostUserName; 317 } 318 319 322 public Date getLastPostDate() { 323 return lastPostDate; 324 } 325 326 329 public void setLastPostDate(Date lastPostDate) { 330 this.lastPostDate = lastPostDate; 331 } 332 333 336 public Long getLastTopicId() { 337 return lastTopicId; 338 } 339 340 343 public void setLastTopicId(Long lastTopicId) { 344 this.lastTopicId = lastTopicId; 345 } 346 347 public Set getForumTopUsers() { 348 return forumTopUsers; 349 } 350 351 public void setForumTopUsers(Set forumTopUsers) { 352 this.forumTopUsers = forumTopUsers; 353 } 354 } 355 | Popular Tags |