001: /*
002: * $Header: /cvsroot/mvnforum/mvnforum/contrib/phpbb2mvnforum/src/org/mvnforum/phpbb2mvnforum/db/PhpbbPrivmMsgs.java,v 1.3 2007/01/15 10:27:33 dungbtm Exp $
003: * $Author: dungbtm $
004: * $Revision: 1.3 $
005: * $Date: 2007/01/15 10:27:33 $
006: *
007: * ====================================================================
008: *
009: * Copyright (C) 2002-2007 by MyVietnam.net
010: *
011: * All copyright notices regarding mvnForum MUST remain
012: * intact in the scripts and in the outputted HTML.
013: * The "powered by" text/logo with a link back to
014: * http://www.mvnForum.com and http://www.MyVietnam.net in
015: * the footer of the pages MUST remain visible when the pages
016: * are viewed on the internet or intranet.
017: *
018: * This program is free software; you can redistribute it and/or modify
019: * it under the terms of the GNU General Public License as published by
020: * the Free Software Foundation; either version 2 of the License, or
021: * any later version.
022: *
023: * This program is distributed in the hope that it will be useful,
024: * but WITHOUT ANY WARRANTY; without even the implied warranty of
025: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
026: * GNU General Public License for more details.
027: *
028: * You should have received a copy of the GNU General Public License
029: * along with this program; if not, write to the Free Software
030: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
031: *
032: * Support can be obtained from support forums at:
033: * http://www.mvnForum.com/mvnforum/index
034: *
035: * Correspondence and Marketing Questions can be sent to:
036: * info at MyVietnam net
037: *
038: * @author:
039: */
040: package org.mvnforum.phpbb2mvnforum.db;
041:
042: import java.util.Collection;//for xml support
043: import java.util.Iterator;//for xml support
044:
045: /*
046: * Included columns: privmsgs_id, privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid,
047: * privmsgs_date, privmsgs_ip, privmsgs_enable_bbcode, privmsgs_enable_html, privmsgs_enable_smilies,
048: * privmsgs_attach_sig
049: * Excluded columns:
050: */
051: public class PhpbbPrivmMsgs {
052: private int privmsgs_id;
053: private int privmsgs_type;
054: private String privmsgs_subject;
055: private int privmsgs_from_userid;
056: private int privmsgs_to_userid;
057: private long privmsgs_date;
058: private String privmsgs_ip;
059: private int privmsgs_enable_bbcode;
060: private int privmsgs_enable_html;
061: private int privmsgs_enable_smilies;
062: private int privmsgs_attach_sig;
063:
064: public int getprivmsgs_id() {
065: return privmsgs_id;
066: }
067:
068: public void setprivmsgs_id(int privmsgs_id) {
069: this .privmsgs_id = privmsgs_id;
070: }
071:
072: public int getprivmsgs_type() {
073: return privmsgs_type;
074: }
075:
076: public void setprivmsgs_type(int privmsgs_type) {
077: this .privmsgs_type = privmsgs_type;
078: }
079:
080: public String getprivmsgs_subject() {
081: return privmsgs_subject;
082: }
083:
084: public void setprivmsgs_subject(String privmsgs_subject) {
085: this .privmsgs_subject = privmsgs_subject;
086: }
087:
088: public int getprivmsgs_from_userid() {
089: return privmsgs_from_userid;
090: }
091:
092: public void setprivmsgs_from_userid(int privmsgs_from_userid) {
093: this .privmsgs_from_userid = privmsgs_from_userid;
094: }
095:
096: public int getprivmsgs_to_userid() {
097: return privmsgs_to_userid;
098: }
099:
100: public void setprivmsgs_to_userid(int privmsgs_to_userid) {
101: this .privmsgs_to_userid = privmsgs_to_userid;
102: }
103:
104: public long getprivmsgs_date() {
105: return privmsgs_date;
106: }
107:
108: public void setprivmsgs_date(long privmsgs_date) {
109: this .privmsgs_date = privmsgs_date;
110: }
111:
112: public String getprivmsgs_ip() {
113: return privmsgs_ip;
114: }
115:
116: public void setprivmsgs_ip(String privmsgs_ip) {
117: this .privmsgs_ip = privmsgs_ip;
118: }
119:
120: public int getprivmsgs_enable_bbcode() {
121: return privmsgs_enable_bbcode;
122: }
123:
124: public void setprivmsgs_enable_bbcode(int privmsgs_enable_bbcode) {
125: this .privmsgs_enable_bbcode = privmsgs_enable_bbcode;
126: }
127:
128: public int getprivmsgs_enable_html() {
129: return privmsgs_enable_html;
130: }
131:
132: public void setprivmsgs_enable_html(int privmsgs_enable_html) {
133: this .privmsgs_enable_html = privmsgs_enable_html;
134: }
135:
136: public int getprivmsgs_enable_smilies() {
137: return privmsgs_enable_smilies;
138: }
139:
140: public void setprivmsgs_enable_smilies(int privmsgs_enable_smilies) {
141: this .privmsgs_enable_smilies = privmsgs_enable_smilies;
142: }
143:
144: public int getprivmsgs_attach_sig() {
145: return privmsgs_attach_sig;
146: }
147:
148: public void setprivmsgs_attach_sig(int privmsgs_attach_sig) {
149: this .privmsgs_attach_sig = privmsgs_attach_sig;
150: }
151:
152: public String getXML() {
153: StringBuffer xml = new StringBuffer(1024);
154: xml.append("<phpbb_privmsgsSection>\n");
155: xml.append(" <Rows>\n");
156: xml.append(" <Row>\n");
157: xml.append(" <Column>\n");
158: xml.append(" <Name>privmsgs_id</Name>\n");
159: xml.append(" <Value>").append(
160: String.valueOf(privmsgs_id)).append("</Value>\n");
161: xml.append(" </Column>\n");
162: xml.append(" <Column>\n");
163: xml.append(" <Name>privmsgs_type</Name>\n");
164: xml.append(" <Value>").append(
165: String.valueOf(privmsgs_type)).append("</Value>\n");
166: xml.append(" </Column>\n");
167: xml.append(" <Column>\n");
168: xml.append(" <Name>privmsgs_subject</Name>\n");
169: xml.append(" <Value>").append(
170: String.valueOf(privmsgs_subject)).append("</Value>\n");
171: xml.append(" </Column>\n");
172: xml.append(" <Column>\n");
173: xml.append(" <Name>privmsgs_from_userid</Name>\n");
174: xml.append(" <Value>").append(
175: String.valueOf(privmsgs_from_userid)).append(
176: "</Value>\n");
177: xml.append(" </Column>\n");
178: xml.append(" <Column>\n");
179: xml.append(" <Name>privmsgs_to_userid</Name>\n");
180: xml.append(" <Value>").append(
181: String.valueOf(privmsgs_to_userid))
182: .append("</Value>\n");
183: xml.append(" </Column>\n");
184: xml.append(" <Column>\n");
185: xml.append(" <Name>privmsgs_date</Name>\n");
186: xml.append(" <Value>").append(
187: String.valueOf(privmsgs_date)).append("</Value>\n");
188: xml.append(" </Column>\n");
189: xml.append(" <Column>\n");
190: xml.append(" <Name>privmsgs_ip</Name>\n");
191: xml.append(" <Value>").append(
192: String.valueOf(privmsgs_ip)).append("</Value>\n");
193: xml.append(" </Column>\n");
194: xml.append(" <Column>\n");
195: xml.append(" <Name>privmsgs_enable_bbcode</Name>\n");
196: xml.append(" <Value>").append(
197: String.valueOf(privmsgs_enable_bbcode)).append(
198: "</Value>\n");
199: xml.append(" </Column>\n");
200: xml.append(" <Column>\n");
201: xml.append(" <Name>privmsgs_enable_html</Name>\n");
202: xml.append(" <Value>").append(
203: String.valueOf(privmsgs_enable_html)).append(
204: "</Value>\n");
205: xml.append(" </Column>\n");
206: xml.append(" <Column>\n");
207: xml.append(" <Name>privmsgs_enable_smilies</Name>\n");
208: xml.append(" <Value>").append(
209: String.valueOf(privmsgs_enable_smilies)).append(
210: "</Value>\n");
211: xml.append(" </Column>\n");
212: xml.append(" <Column>\n");
213: xml.append(" <Name>privmsgs_attach_sig</Name>\n");
214: xml.append(" <Value>").append(
215: String.valueOf(privmsgs_attach_sig)).append(
216: "</Value>\n");
217: xml.append(" </Column>\n");
218: xml.append(" </Row>\n");
219: xml.append(" </Rows>\n");
220: xml.append("</phpbb_privmsgsSection>\n");
221: return xml.toString();
222: }
223:
224: public static String getXML(Collection objphpbb_privmsgsBeans) {
225: StringBuffer xml = new StringBuffer(1024);
226: Iterator iterator = objphpbb_privmsgsBeans.iterator();
227: xml.append("<phpbb_privmsgsSection>\n");
228: xml.append(" <Rows>\n");
229: while (iterator.hasNext()) {
230: PhpbbPrivmMsgs objphpbb_privmsgsBean = (PhpbbPrivmMsgs) iterator
231: .next();
232: xml.append(" <Row>\n");
233: xml.append(" <Column>\n");
234: xml.append(" <Name>privmsgs_id</Name>\n");
235: xml.append(" <Value>").append(
236: String.valueOf(objphpbb_privmsgsBean.privmsgs_id))
237: .append("</Value>\n");
238: xml.append(" </Column>\n");
239: xml.append(" <Column>\n");
240: xml.append(" <Name>privmsgs_type</Name>\n");
241: xml
242: .append(" <Value>")
243: .append(
244: String
245: .valueOf(objphpbb_privmsgsBean.privmsgs_type))
246: .append("</Value>\n");
247: xml.append(" </Column>\n");
248: xml.append(" <Column>\n");
249: xml.append(" <Name>privmsgs_subject</Name>\n");
250: xml
251: .append(" <Value>")
252: .append(
253: String
254: .valueOf(objphpbb_privmsgsBean.privmsgs_subject))
255: .append("</Value>\n");
256: xml.append(" </Column>\n");
257: xml.append(" <Column>\n");
258: xml.append(" <Name>privmsgs_from_userid</Name>\n");
259: xml
260: .append(" <Value>")
261: .append(
262: String
263: .valueOf(objphpbb_privmsgsBean.privmsgs_from_userid))
264: .append("</Value>\n");
265: xml.append(" </Column>\n");
266: xml.append(" <Column>\n");
267: xml.append(" <Name>privmsgs_to_userid</Name>\n");
268: xml
269: .append(" <Value>")
270: .append(
271: String
272: .valueOf(objphpbb_privmsgsBean.privmsgs_to_userid))
273: .append("</Value>\n");
274: xml.append(" </Column>\n");
275: xml.append(" <Column>\n");
276: xml.append(" <Name>privmsgs_date</Name>\n");
277: xml
278: .append(" <Value>")
279: .append(
280: String
281: .valueOf(objphpbb_privmsgsBean.privmsgs_date))
282: .append("</Value>\n");
283: xml.append(" </Column>\n");
284: xml.append(" <Column>\n");
285: xml.append(" <Name>privmsgs_ip</Name>\n");
286: xml.append(" <Value>").append(
287: String.valueOf(objphpbb_privmsgsBean.privmsgs_ip))
288: .append("</Value>\n");
289: xml.append(" </Column>\n");
290: xml.append(" <Column>\n");
291: xml.append(" <Name>privmsgs_enable_bbcode</Name>\n");
292: xml
293: .append(" <Value>")
294: .append(
295: String
296: .valueOf(objphpbb_privmsgsBean.privmsgs_enable_bbcode))
297: .append("</Value>\n");
298: xml.append(" </Column>\n");
299: xml.append(" <Column>\n");
300: xml.append(" <Name>privmsgs_enable_html</Name>\n");
301: xml
302: .append(" <Value>")
303: .append(
304: String
305: .valueOf(objphpbb_privmsgsBean.privmsgs_enable_html))
306: .append("</Value>\n");
307: xml.append(" </Column>\n");
308: xml.append(" <Column>\n");
309: xml
310: .append(" <Name>privmsgs_enable_smilies</Name>\n");
311: xml
312: .append(" <Value>")
313: .append(
314: String
315: .valueOf(objphpbb_privmsgsBean.privmsgs_enable_smilies))
316: .append("</Value>\n");
317: xml.append(" </Column>\n");
318: xml.append(" <Column>\n");
319: xml.append(" <Name>privmsgs_attach_sig</Name>\n");
320: xml
321: .append(" <Value>")
322: .append(
323: String
324: .valueOf(objphpbb_privmsgsBean.privmsgs_attach_sig))
325: .append("</Value>\n");
326: xml.append(" </Column>\n");
327: xml.append(" </Row>\n");
328: }//while
329: xml.append(" </Rows>\n");
330: xml.append("</phpbb_privmsgsSection>\n");
331: return xml.toString();
332: }
333: } //end of class phpbb_privmsgsBean
|