KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.javabb.vo;
2
3 import java.util.Date JavaDoc;
4
5
6 public class PostText extends Post {
7     
8     private static final long serialVersionUID = 1L;
9     public String JavaDoc postBody;
10
11     /*
12      * Used on search
13      */

14     public PostText(Long JavaDoc topicId, Integer JavaDoc pageLastPost, Long JavaDoc postId, String JavaDoc titleTopic,
15             Long JavaDoc forumId, String JavaDoc forumName, Date JavaDoc postDate, Long JavaDoc userId, String JavaDoc userName,
16             Integer JavaDoc replies, Integer JavaDoc views, String JavaDoc postBody){
17         
18         Topic topic = new Topic();
19         topic.setId(topicId);
20         topic.setPageLastPost(pageLastPost);
21         topic.setTitleTopic(titleTopic);
22         topic.setRespostas(replies);
23         topic.setVisualizacoes(views);
24         
25         Forum forum = new Forum();
26         forum.setId(forumId);
27         forum.setNome(forumName);
28         
29         topic.setForum(forum);
30         this.setTopic(topic);
31         
32         User user = new User();
33         user.setIdUser(userId);
34         user.setUser(userName);
35         this.setUser(user);
36         
37         this.setIdPost(postId);
38         this.setPostDate(postDate);
39         this.setPostBody(postBody);
40         
41     }
42     
43     
44     public PostText(){
45         
46     }
47     
48     /**
49      * @return Returns the postBody.
50      */

51     public String JavaDoc getPostBody() {
52         return postBody;
53     }
54     /**
55      * @param postBody The postBody to set.
56      */

57     public void setPostBody(String JavaDoc postBody) {
58         this.postBody = postBody;
59     }
60 }
61
Popular Tags