001: /*
002: * $Header: /cvsroot/mvnforum/mvnforum/contrib/phpbb2mvnforum/src/org/mvnforum/phpbb2mvnforum/db/PhpbbRanks.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;
043: import java.util.Iterator;
044:
045: /*
046: * Included columns: rank_id, rank_title, rank_min, rank_special, rank_image
047: * Excluded columns:
048: */
049: public class PhpbbRanks {
050: private int rank_id;
051:
052: private String rank_title;
053:
054: private int rank_min;
055:
056: private int rank_special;
057:
058: private String rank_image;
059:
060: public int getrank_id() {
061: return rank_id;
062: }
063:
064: public void setrank_id(int rank_id) {
065: this .rank_id = rank_id;
066: }
067:
068: public String getrank_title() {
069: return rank_title;
070: }
071:
072: public void setrank_title(String rank_title) {
073: this .rank_title = rank_title;
074: }
075:
076: public int getrank_min() {
077: return rank_min;
078: }
079:
080: public void setrank_min(int rank_min) {
081: this .rank_min = rank_min;
082: }
083:
084: public int getrank_special() {
085: return rank_special;
086: }
087:
088: public void setrank_special(int rank_special) {
089: this .rank_special = rank_special;
090: }
091:
092: public String getrank_image() {
093: return rank_image;
094: }
095:
096: public void setrank_image(String rank_image) {
097: this .rank_image = rank_image;
098: }
099:
100: public String getXML() {
101: StringBuffer xml = new StringBuffer(1024);
102: xml.append("<phpbb_ranksSection>\n");
103: xml.append(" <Rows>\n");
104: xml.append(" <Row>\n");
105: xml.append(" <Column>\n");
106: xml.append(" <Name>rank_id</Name>\n");
107: xml.append(" <Value>").append(String.valueOf(rank_id))
108: .append("</Value>\n");
109: xml.append(" </Column>\n");
110: xml.append(" <Column>\n");
111: xml.append(" <Name>rank_title</Name>\n");
112: xml.append(" <Value>")
113: .append(String.valueOf(rank_title))
114: .append("</Value>\n");
115: xml.append(" </Column>\n");
116: xml.append(" <Column>\n");
117: xml.append(" <Name>rank_min</Name>\n");
118: xml.append(" <Value>").append(String.valueOf(rank_min))
119: .append("</Value>\n");
120: xml.append(" </Column>\n");
121: xml.append(" <Column>\n");
122: xml.append(" <Name>rank_special</Name>\n");
123: xml.append(" <Value>").append(
124: String.valueOf(rank_special)).append("</Value>\n");
125: xml.append(" </Column>\n");
126: xml.append(" <Column>\n");
127: xml.append(" <Name>rank_image</Name>\n");
128: xml.append(" <Value>")
129: .append(String.valueOf(rank_image))
130: .append("</Value>\n");
131: xml.append(" </Column>\n");
132: xml.append(" </Row>\n");
133: xml.append(" </Rows>\n");
134: xml.append("</phpbb_ranksSection>\n");
135: return xml.toString();
136: }
137:
138: public static String getXML(Collection objphpbb_ranksBeans) {
139: StringBuffer xml = new StringBuffer(1024);
140: Iterator iterator = objphpbb_ranksBeans.iterator();
141: xml.append("<phpbb_ranksSection>\n");
142: xml.append(" <Rows>\n");
143: while (iterator.hasNext()) {
144: PhpbbRanks objphpbb_ranksBean = (PhpbbRanks) iterator
145: .next();
146: xml.append(" <Row>\n");
147: xml.append(" <Column>\n");
148: xml.append(" <Name>rank_id</Name>\n");
149: xml.append(" <Value>").append(
150: String.valueOf(objphpbb_ranksBean.rank_id)).append(
151: "</Value>\n");
152: xml.append(" </Column>\n");
153: xml.append(" <Column>\n");
154: xml.append(" <Name>rank_title</Name>\n");
155: xml.append(" <Value>").append(
156: String.valueOf(objphpbb_ranksBean.rank_title))
157: .append("</Value>\n");
158: xml.append(" </Column>\n");
159: xml.append(" <Column>\n");
160: xml.append(" <Name>rank_min</Name>\n");
161: xml.append(" <Value>").append(
162: String.valueOf(objphpbb_ranksBean.rank_min))
163: .append("</Value>\n");
164: xml.append(" </Column>\n");
165: xml.append(" <Column>\n");
166: xml.append(" <Name>rank_special</Name>\n");
167: xml.append(" <Value>").append(
168: String.valueOf(objphpbb_ranksBean.rank_special))
169: .append("</Value>\n");
170: xml.append(" </Column>\n");
171: xml.append(" <Column>\n");
172: xml.append(" <Name>rank_image</Name>\n");
173: xml.append(" <Value>").append(
174: String.valueOf(objphpbb_ranksBean.rank_image))
175: .append("</Value>\n");
176: xml.append(" </Column>\n");
177: xml.append(" </Row>\n");
178: }//while
179: xml.append(" </Rows>\n");
180: xml.append("</phpbb_ranksSection>\n");
181: return xml.toString();
182: }
183: } //end of class phpbb_ranksBean
|