KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mvnforum > phpbb2mvnforum > db > PhpbbForum


1 package org.mvnforum.phpbb2mvnforum.db;
2
3 //import java.sql.*; // @todo: uncomment as needed
4
import java.util.Collection JavaDoc;//for xml support
5
import java.util.Iterator JavaDoc;//for xml support
6

7 /*
8  * Included columns: forum_id, cat_id, forum_name, forum_desc, forum_status,
9  * forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next,
10  * prune_enable, auth_view, auth_read, auth_post, auth_reply,
11  * auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote,
12  * auth_pollcreate, auth_attachments
13  * Excluded columns:
14  */

15 public class PhpbbForum {
16     private int forum_id;
17     private int cat_id;
18     private String JavaDoc forum_name;
19     private String JavaDoc forum_desc;
20     private int forum_status;
21     private int forum_order;
22     private int forum_posts;
23     private int forum_topics;
24     private int forum_last_post_id;
25     private int prune_next;
26     private int prune_enable;
27     private int auth_view;
28     private int auth_read;
29     private int auth_post;
30     private int auth_reply;
31     private int auth_edit;
32     private int auth_delete;
33     private int auth_sticky;
34     private int auth_announce;
35     private int auth_vote;
36     private int auth_pollcreate;
37     private int auth_attachments;
38
39     public int getforum_id() {
40         return forum_id;
41     }
42     public void setforum_id(int forum_id) {
43         this.forum_id = forum_id;
44     }
45
46     public int getcat_id() {
47         return cat_id;
48     }
49     public void setcat_id(int cat_id) {
50         this.cat_id = cat_id;
51     }
52
53     public String JavaDoc getforum_name() {
54         return forum_name;
55     }
56     public void setforum_name(String JavaDoc forum_name) {
57         this.forum_name = forum_name;
58     }
59
60     public String JavaDoc getforum_desc() {
61         return forum_desc;
62     }
63     public void setforum_desc(String JavaDoc forum_desc) {
64         this.forum_desc = forum_desc;
65     }
66
67     public int getforum_status() {
68         return forum_status;
69     }
70     public void setforum_status(int forum_status) {
71         this.forum_status = forum_status;
72     }
73
74     public int getforum_order() {
75         return forum_order;
76     }
77     public void setforum_order(int forum_order) {
78         this.forum_order = forum_order;
79     }
80
81     public int getforum_posts() {
82         return forum_posts;
83     }
84     public void setforum_posts(int forum_posts) {
85         this.forum_posts = forum_posts;
86     }
87
88     public int getforum_topics() {
89         return forum_topics;
90     }
91     public void setforum_topics(int forum_topics) {
92         this.forum_topics = forum_topics;
93     }
94
95     public int getforum_last_post_id() {
96         return forum_last_post_id;
97     }
98     public void setforum_last_post_id(int forum_last_post_id) {
99         this.forum_last_post_id = forum_last_post_id;
100     }
101
102     public int getprune_next() {
103         return prune_next;
104     }
105     public void setprune_next(int prune_next) {
106         this.prune_next = prune_next;
107     }
108
109     public int getprune_enable() {
110         return prune_enable;
111     }
112     public void setprune_enable(int prune_enable) {
113         this.prune_enable = prune_enable;
114     }
115
116     public int getauth_view() {
117         return auth_view;
118     }
119     public void setauth_view(int auth_view) {
120         this.auth_view = auth_view;
121     }
122
123     public int getauth_read() {
124         return auth_read;
125     }
126     public void setauth_read(int auth_read) {
127         this.auth_read = auth_read;
128     }
129
130     public int getauth_post() {
131         return auth_post;
132     }
133     public void setauth_post(int auth_post) {
134         this.auth_post = auth_post;
135     }
136
137     public int getauth_reply() {
138         return auth_reply;
139     }
140     public void setauth_reply(int auth_reply) {
141         this.auth_reply = auth_reply;
142     }
143
144     public int getauth_edit() {
145         return auth_edit;
146     }
147     public void setauth_edit(int auth_edit) {
148         this.auth_edit = auth_edit;
149     }
150
151     public int getauth_delete() {
152         return auth_delete;
153     }
154     public void setauth_delete(int auth_delete) {
155         this.auth_delete = auth_delete;
156     }
157
158     public int getauth_sticky() {
159         return auth_sticky;
160     }
161     public void setauth_sticky(int auth_sticky) {
162         this.auth_sticky = auth_sticky;
163     }
164
165     public int getauth_announce() {
166         return auth_announce;
167     }
168     public void setauth_announce(int auth_announce) {
169         this.auth_announce = auth_announce;
170     }
171
172     public int getauth_vote() {
173         return auth_vote;
174     }
175     public void setauth_vote(int auth_vote) {
176         this.auth_vote = auth_vote;
177     }
178
179     public int getauth_pollcreate() {
180         return auth_pollcreate;
181     }
182     public void setauth_pollcreate(int auth_pollcreate) {
183         this.auth_pollcreate = auth_pollcreate;
184     }
185
186     public int getauth_attachments() {
187         return auth_attachments;
188     }
189     public void setauth_attachments(int auth_attachments) {
190         this.auth_attachments = auth_attachments;
191     }
192
193     public String JavaDoc getXML() {
194         StringBuffer JavaDoc xml = new StringBuffer JavaDoc(1024);
195         xml.append("<phpbb_forumsSection>\n");
196         xml.append(" <Rows>\n");
197         xml.append(" <Row>\n");
198         xml.append(" <Column>\n");
199         xml.append(" <Name>forum_id</Name>\n");
200         xml.append(" <Value>").append(String.valueOf(forum_id)).append("</Value>\n");
201         xml.append(" </Column>\n");
202         xml.append(" <Column>\n");
203         xml.append(" <Name>cat_id</Name>\n");
204         xml.append(" <Value>").append(String.valueOf(cat_id)).append("</Value>\n");
205         xml.append(" </Column>\n");
206         xml.append(" <Column>\n");
207         xml.append(" <Name>forum_name</Name>\n");
208         xml.append(" <Value>").append(String.valueOf(forum_name)).append("</Value>\n");
209         xml.append(" </Column>\n");
210         xml.append(" <Column>\n");
211         xml.append(" <Name>forum_desc</Name>\n");
212         xml.append(" <Value>").append(String.valueOf(forum_desc)).append("</Value>\n");
213         xml.append(" </Column>\n");
214         xml.append(" <Column>\n");
215         xml.append(" <Name>forum_status</Name>\n");
216         xml.append(" <Value>").append(String.valueOf(forum_status)).append("</Value>\n");
217         xml.append(" </Column>\n");
218         xml.append(" <Column>\n");
219         xml.append(" <Name>forum_order</Name>\n");
220         xml.append(" <Value>").append(String.valueOf(forum_order)).append("</Value>\n");
221         xml.append(" </Column>\n");
222         xml.append(" <Column>\n");
223         xml.append(" <Name>forum_posts</Name>\n");
224         xml.append(" <Value>").append(String.valueOf(forum_posts)).append("</Value>\n");
225         xml.append(" </Column>\n");
226         xml.append(" <Column>\n");
227         xml.append(" <Name>forum_topics</Name>\n");
228         xml.append(" <Value>").append(String.valueOf(forum_topics)).append("</Value>\n");
229         xml.append(" </Column>\n");
230         xml.append(" <Column>\n");
231         xml.append(" <Name>forum_last_post_id</Name>\n");
232         xml.append(" <Value>").append(String.valueOf(forum_last_post_id)).append("</Value>\n");
233         xml.append(" </Column>\n");
234         xml.append(" <Column>\n");
235         xml.append(" <Name>prune_next</Name>\n");
236         xml.append(" <Value>").append(String.valueOf(prune_next)).append("</Value>\n");
237         xml.append(" </Column>\n");
238         xml.append(" <Column>\n");
239         xml.append(" <Name>prune_enable</Name>\n");
240         xml.append(" <Value>").append(String.valueOf(prune_enable)).append("</Value>\n");
241         xml.append(" </Column>\n");
242         xml.append(" <Column>\n");
243         xml.append(" <Name>auth_view</Name>\n");
244         xml.append(" <Value>").append(String.valueOf(auth_view)).append("</Value>\n");
245         xml.append(" </Column>\n");
246         xml.append(" <Column>\n");
247         xml.append(" <Name>auth_read</Name>\n");
248         xml.append(" <Value>").append(String.valueOf(auth_read)).append("</Value>\n");
249         xml.append(" </Column>\n");
250         xml.append(" <Column>\n");
251         xml.append(" <Name>auth_post</Name>\n");
252         xml.append(" <Value>").append(String.valueOf(auth_post)).append("</Value>\n");
253         xml.append(" </Column>\n");
254         xml.append(" <Column>\n");
255         xml.append(" <Name>auth_reply</Name>\n");
256         xml.append(" <Value>").append(String.valueOf(auth_reply)).append("</Value>\n");
257         xml.append(" </Column>\n");
258         xml.append(" <Column>\n");
259         xml.append(" <Name>auth_edit</Name>\n");
260         xml.append(" <Value>").append(String.valueOf(auth_edit)).append("</Value>\n");
261         xml.append(" </Column>\n");
262         xml.append(" <Column>\n");
263         xml.append(" <Name>auth_delete</Name>\n");
264         xml.append(" <Value>").append(String.valueOf(auth_delete)).append("</Value>\n");
265         xml.append(" </Column>\n");
266         xml.append(" <Column>\n");
267         xml.append(" <Name>auth_sticky</Name>\n");
268         xml.append(" <Value>").append(String.valueOf(auth_sticky)).append("</Value>\n");
269         xml.append(" </Column>\n");
270         xml.append(" <Column>\n");
271         xml.append(" <Name>auth_announce</Name>\n");
272         xml.append(" <Value>").append(String.valueOf(auth_announce)).append("</Value>\n");
273         xml.append(" </Column>\n");
274         xml.append(" <Column>\n");
275         xml.append(" <Name>auth_vote</Name>\n");
276         xml.append(" <Value>").append(String.valueOf(auth_vote)).append("</Value>\n");
277         xml.append(" </Column>\n");
278         xml.append(" <Column>\n");
279         xml.append(" <Name>auth_pollcreate</Name>\n");
280         xml.append(" <Value>").append(String.valueOf(auth_pollcreate)).append("</Value>\n");
281         xml.append(" </Column>\n");
282         xml.append(" <Column>\n");
283         xml.append(" <Name>auth_attachments</Name>\n");
284         xml.append(" <Value>").append(String.valueOf(auth_attachments)).append("</Value>\n");
285         xml.append(" </Column>\n");
286         xml.append(" </Row>\n");
287         xml.append(" </Rows>\n");
288         xml.append("</phpbb_forumsSection>\n");
289         return xml.toString();
290     }
291
292     public static String JavaDoc getXML(Collection JavaDoc objphpbb_forumsBeans) {
293         StringBuffer JavaDoc xml = new StringBuffer JavaDoc(1024);
294         Iterator JavaDoc iterator = objphpbb_forumsBeans.iterator();
295         xml.append("<phpbb_forumsSection>\n");
296         xml.append(" <Rows>\n");
297         while (iterator.hasNext()) {
298             PhpbbForum objphpbb_forumsBean = (PhpbbForum)iterator.next();
299             xml.append(" <Row>\n");
300             xml.append(" <Column>\n");
301             xml.append(" <Name>forum_id</Name>\n");
302             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_id)).append("</Value>\n");
303             xml.append(" </Column>\n");
304             xml.append(" <Column>\n");
305             xml.append(" <Name>cat_id</Name>\n");
306             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.cat_id)).append("</Value>\n");
307             xml.append(" </Column>\n");
308             xml.append(" <Column>\n");
309             xml.append(" <Name>forum_name</Name>\n");
310             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_name)).append("</Value>\n");
311             xml.append(" </Column>\n");
312             xml.append(" <Column>\n");
313             xml.append(" <Name>forum_desc</Name>\n");
314             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_desc)).append("</Value>\n");
315             xml.append(" </Column>\n");
316             xml.append(" <Column>\n");
317             xml.append(" <Name>forum_status</Name>\n");
318             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_status)).append("</Value>\n");
319             xml.append(" </Column>\n");
320             xml.append(" <Column>\n");
321             xml.append(" <Name>forum_order</Name>\n");
322             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_order)).append("</Value>\n");
323             xml.append(" </Column>\n");
324             xml.append(" <Column>\n");
325             xml.append(" <Name>forum_posts</Name>\n");
326             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_posts)).append("</Value>\n");
327             xml.append(" </Column>\n");
328             xml.append(" <Column>\n");
329             xml.append(" <Name>forum_topics</Name>\n");
330             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_topics)).append("</Value>\n");
331             xml.append(" </Column>\n");
332             xml.append(" <Column>\n");
333             xml.append(" <Name>forum_last_post_id</Name>\n");
334             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.forum_last_post_id)).append("</Value>\n");
335             xml.append(" </Column>\n");
336             xml.append(" <Column>\n");
337             xml.append(" <Name>prune_next</Name>\n");
338             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.prune_next)).append("</Value>\n");
339             xml.append(" </Column>\n");
340             xml.append(" <Column>\n");
341             xml.append(" <Name>prune_enable</Name>\n");
342             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.prune_enable)).append("</Value>\n");
343             xml.append(" </Column>\n");
344             xml.append(" <Column>\n");
345             xml.append(" <Name>auth_view</Name>\n");
346             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_view)).append("</Value>\n");
347             xml.append(" </Column>\n");
348             xml.append(" <Column>\n");
349             xml.append(" <Name>auth_read</Name>\n");
350             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_read)).append("</Value>\n");
351             xml.append(" </Column>\n");
352             xml.append(" <Column>\n");
353             xml.append(" <Name>auth_post</Name>\n");
354             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_post)).append("</Value>\n");
355             xml.append(" </Column>\n");
356             xml.append(" <Column>\n");
357             xml.append(" <Name>auth_reply</Name>\n");
358             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_reply)).append("</Value>\n");
359             xml.append(" </Column>\n");
360             xml.append(" <Column>\n");
361             xml.append(" <Name>auth_edit</Name>\n");
362             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_edit)).append("</Value>\n");
363             xml.append(" </Column>\n");
364             xml.append(" <Column>\n");
365             xml.append(" <Name>auth_delete</Name>\n");
366             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_delete)).append("</Value>\n");
367             xml.append(" </Column>\n");
368             xml.append(" <Column>\n");
369             xml.append(" <Name>auth_sticky</Name>\n");
370             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_sticky)).append("</Value>\n");
371             xml.append(" </Column>\n");
372             xml.append(" <Column>\n");
373             xml.append(" <Name>auth_announce</Name>\n");
374             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_announce)).append("</Value>\n");
375             xml.append(" </Column>\n");
376             xml.append(" <Column>\n");
377             xml.append(" <Name>auth_vote</Name>\n");
378             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_vote)).append("</Value>\n");
379             xml.append(" </Column>\n");
380             xml.append(" <Column>\n");
381             xml.append(" <Name>auth_pollcreate</Name>\n");
382             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_pollcreate)).append("</Value>\n");
383             xml.append(" </Column>\n");
384             xml.append(" <Column>\n");
385             xml.append(" <Name>auth_attachments</Name>\n");
386             xml.append(" <Value>").append(String.valueOf(objphpbb_forumsBean.auth_attachments)).append("</Value>\n");
387             xml.append(" </Column>\n");
388             xml.append(" </Row>\n");
389         }//while
390
xml.append(" </Rows>\n");
391         xml.append("</phpbb_forumsSection>\n");
392         return xml.toString();
393     }
394 } //end of class phpbb_forumsBean
395
Popular Tags