1 package org.mvnforum.phpbb2mvnforum.db; 2 3 import java.util.Collection ;import java.util.Iterator ; 7 11 public class PhpbbPrivmMsgsText { 12 private int privmsgs_text_id; 13 private String privmsgs_bbcode_uid; 14 private String privmsgs_text; 15 16 public int getprivmsgs_text_id() { 17 return privmsgs_text_id; 18 } 19 public void setprivmsgs_text_id(int privmsgs_text_id) { 20 this.privmsgs_text_id = privmsgs_text_id; 21 } 22 23 public String getprivmsgs_bbcode_uid() { 24 return privmsgs_bbcode_uid; 25 } 26 public void setprivmsgs_bbcode_uid(String privmsgs_bbcode_uid) { 27 this.privmsgs_bbcode_uid = privmsgs_bbcode_uid; 28 } 29 30 public String getprivmsgs_text() { 31 return privmsgs_text; 32 } 33 public void setprivmsgs_text(String privmsgs_text) { 34 this.privmsgs_text = privmsgs_text; 35 } 36 37 public String getXML() { 38 StringBuffer xml = new StringBuffer (1024); 39 xml.append("<phpbb_privmsgs_textSection>\n"); 40 xml.append(" <Rows>\n"); 41 xml.append(" <Row>\n"); 42 xml.append(" <Column>\n"); 43 xml.append(" <Name>privmsgs_text_id</Name>\n"); 44 xml.append(" <Value>").append(String.valueOf(privmsgs_text_id)).append("</Value>\n"); 45 xml.append(" </Column>\n"); 46 xml.append(" <Column>\n"); 47 xml.append(" <Name>privmsgs_bbcode_uid</Name>\n"); 48 xml.append(" <Value>").append(String.valueOf(privmsgs_bbcode_uid)).append("</Value>\n"); 49 xml.append(" </Column>\n"); 50 xml.append(" <Column>\n"); 51 xml.append(" <Name>privmsgs_text</Name>\n"); 52 xml.append(" <Value>").append(String.valueOf(privmsgs_text)).append("</Value>\n"); 53 xml.append(" </Column>\n"); 54 xml.append(" </Row>\n"); 55 xml.append(" </Rows>\n"); 56 xml.append("</phpbb_privmsgs_textSection>\n"); 57 return xml.toString(); 58 } 59 60 public static String getXML(Collection objphpbb_privmsgs_textBeans) { 61 StringBuffer xml = new StringBuffer (1024); 62 Iterator iterator = objphpbb_privmsgs_textBeans.iterator(); 63 xml.append("<phpbb_privmsgs_textSection>\n"); 64 xml.append(" <Rows>\n"); 65 while (iterator.hasNext()) { 66 PhpbbPrivmMsgsText objphpbb_privmsgs_textBean = (PhpbbPrivmMsgsText)iterator.next(); 67 xml.append(" <Row>\n"); 68 xml.append(" <Column>\n"); 69 xml.append(" <Name>privmsgs_text_id</Name>\n"); 70 xml.append(" <Value>").append(String.valueOf(objphpbb_privmsgs_textBean.privmsgs_text_id)).append("</Value>\n"); 71 xml.append(" </Column>\n"); 72 xml.append(" <Column>\n"); 73 xml.append(" <Name>privmsgs_bbcode_uid</Name>\n"); 74 xml.append(" <Value>").append(String.valueOf(objphpbb_privmsgs_textBean.privmsgs_bbcode_uid)).append("</Value>\n"); 75 xml.append(" </Column>\n"); 76 xml.append(" <Column>\n"); 77 xml.append(" <Name>privmsgs_text</Name>\n"); 78 xml.append(" <Value>").append(String.valueOf(objphpbb_privmsgs_textBean.privmsgs_text)).append("</Value>\n"); 79 xml.append(" </Column>\n"); 80 xml.append(" </Row>\n"); 81 } xml.append(" </Rows>\n"); 83 xml.append("</phpbb_privmsgs_textSection>\n"); 84 return xml.toString(); 85 } 86 } | Popular Tags |