KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > geinuke > vo > ForumVO


1
2
3  /*
4  -- GeiNuke --
5 Copyright (c) 2005 by Roberto Sidoti [geinuke@users.sourceforge.net]
6  http://www.hostingjava.it/-geinuke/
7
8 This file is part of GeiNuke.
9
10     GeiNuke is free software; you can redistribute it and/or modify
11     it under the terms of the GNU General Public License as published by
12     the Free Software Foundation; either version 2 of the License, or
13     (at your option) any later version.
14
15     GeiNuke is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18     GNU General Public License for more details.
19
20     You should have received a copy of the GNU General Public License
21     along with GeiNuke; if not, write to the Free Software
22     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 */

24 package com.geinuke.vo;
25
26 import java.io.Serializable JavaDoc;
27 import java.util.ArrayList JavaDoc;
28 import java.util.Date JavaDoc;
29 import java.util.GregorianCalendar JavaDoc;
30
31 import com.geinuke.util.CountArrayList;
32
33
34 public class ForumVO implements Serializable JavaDoc{
35     public static final int STATE_CREATED=0;
36     public static final int STATE_VISIBLE=1;
37     public static final int STATE_MIDDLE=2;
38     public static final int STATE_BLOCKED=3;
39     
40     protected int fId=0;
41     
42     protected String JavaDoc fName=null;
43     protected String JavaDoc fDescription=null;
44     protected int fType=0;
45     protected int fState=0;
46     protected int fImage=0;
47     //protected ArrayList categories=null;
48
protected CountArrayList topics=null;
49     protected ArrayList JavaDoc moderators=null;
50     protected ArrayList JavaDoc categories=null;
51     protected UserVO lastUser=null;
52     protected long lastEntry=0;
53     protected boolean visited=false;
54     protected int commentCount=0;
55     
56     public ForumVO(){
57         this.moderators=new ArrayList JavaDoc();
58         this.topics=new CountArrayList();
59         this.categories=new ArrayList JavaDoc();
60     }
61     public String JavaDoc getFDescription() {
62         return fDescription;
63     }
64     public void setFDescription(String JavaDoc description) {
65         fDescription = description;
66     }
67     public int getFId() {
68         return fId;
69     }
70     public void setFId(int id) {
71         fId = id;
72     }
73     public int getFImage() {
74         return fImage;
75     }
76     public void setFImage(int image) {
77         fImage = image;
78     }
79     public String JavaDoc getFName() {
80         return fName;
81     }
82     public void setFName(String JavaDoc name) {
83         fName = name;
84     }
85     public int getFState() {
86         return fState;
87     }
88     public void setFState(int state) {
89         fState = state;
90     }
91     public int getFType() {
92         return fType;
93     }
94     public void setFType(int type) {
95         fType = type;
96     }
97     
98     
99     public CountArrayList getTopics() {
100         return topics;
101     }
102     public void setTopics(CountArrayList topics) {
103         this.topics = topics;
104     }
105     public ArrayList JavaDoc getModerators() {
106         return moderators;
107     }
108     public void setModerators(ArrayList JavaDoc moderators) {
109         this.moderators = moderators;
110     }
111     /**
112      * @return Returns the categories.
113      */

114     public ArrayList JavaDoc getCategories() {
115         return categories;
116     }
117     /**
118      * @param categories The categories to set.
119      */

120     public void setCategories(ArrayList JavaDoc categories) {
121         this.categories = categories;
122     }
123     public long getLastEntry() {
124         return lastEntry;
125     }
126     
127     public GregorianCalendar JavaDoc getLastDateTime() {
128         GregorianCalendar JavaDoc gc=null;
129         Date JavaDoc d=new Date JavaDoc(this.lastEntry);
130         gc=new GregorianCalendar JavaDoc();
131         gc.setTime(d);
132         return gc;
133     }
134     
135     public void setLastEntry(long lastEntry) {
136         this.lastEntry = lastEntry;
137     }
138     public UserVO getLastUser() {
139         return lastUser;
140     }
141     public void setLastUser(UserVO lastUser) {
142         this.lastUser = lastUser;
143     }
144     public boolean isVisited() {
145         return visited;
146     }
147     public void setVisited(boolean visited) {
148         this.visited = visited;
149     }
150     public int getCommentCount() {
151         return commentCount;
152     }
153     public void setCommentCount(int commentCount) {
154         this.commentCount = commentCount;
155     }
156 }
157
Popular Tags