KickJava   Java API By Example, From Geeks To Geeks.

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


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

23 package com.geinuke.vo;
24
25 import java.io.Serializable JavaDoc;
26 import java.util.ArrayList JavaDoc;
27 import java.util.Date JavaDoc;
28 import java.util.GregorianCalendar JavaDoc;
29
30 import com.geinuke.util.collection.TreeArrayList;
31
32
33
34 public class NewsVO implements Serializable JavaDoc{
35     protected int nId=-1;
36     protected int uId=-1;
37     protected boolean enabled=false;
38     protected long time=0;
39     protected String JavaDoc title=null;
40     protected String JavaDoc bodyText=null;
41     protected String JavaDoc headText=null;
42     protected String JavaDoc notes=null;
43     protected ArrayList JavaDoc categories=null;
44     protected ArrayList JavaDoc topics=null;
45     protected TreeArrayList comments=null;
46     
47     public NewsVO(){
48         this.categories=new ArrayList JavaDoc();
49         this.topics=new ArrayList JavaDoc();
50         this.notes="";
51     }
52     public ArrayList JavaDoc getCategories() {
53         return categories;
54     }
55     public void setCategories(ArrayList JavaDoc categories) {
56         this.categories = categories;
57     }
58     public int getNId() {
59         return nId;
60     }
61     public void setNId(int id) {
62         nId = id;
63     }
64     public String JavaDoc getNotes() {
65         return notes;
66     }
67     public void setNotes(String JavaDoc notes) {
68         this.notes = notes;
69     }
70     public String JavaDoc getTitle() {
71         return title;
72     }
73     public void setTitle(String JavaDoc title) {
74         this.title = title;
75     }
76     public ArrayList JavaDoc getTopics() {
77         return topics;
78     }
79     public void setTopics(ArrayList JavaDoc topics) {
80         this.topics = topics;
81     }
82     public String JavaDoc getBodyText() {
83         return bodyText;
84     }
85     public void setBodyText(String JavaDoc bodyText) {
86         this.bodyText = bodyText;
87     }
88     public String JavaDoc getHeadText() {
89         return headText;
90     }
91     public void setHeadText(String JavaDoc headText) {
92         this.headText = headText;
93     }
94     public boolean isEnabled() {
95         return enabled;
96     }
97     public void setEnabled(boolean enbled) {
98         this.enabled = enbled;
99     }
100     
101     public long getTime() {
102         return time;
103     }
104     
105     public GregorianCalendar JavaDoc getDateTime() {
106         GregorianCalendar JavaDoc gc=null;
107         Date JavaDoc d=new Date JavaDoc(this.time);
108         gc=new GregorianCalendar JavaDoc();
109         gc.setTime(d);
110         
111         
112         return gc;
113     }
114     public void setTime(long time) {
115         this.time = time;
116     }
117     public int getUId() {
118         return uId;
119     }
120     public void setUId(int id) {
121         uId = id;
122     }
123     /**
124      * @return Returns the comments.
125      */

126     public TreeArrayList getComments() {
127         return comments;
128     }
129     /**
130      * @param comments The comments to set.
131      */

132     public void setComments(TreeArrayList comments) {
133         this.comments = comments;
134     }
135 }
136
Popular Tags