1 41 package com.mvnforum.db; 42 43 import java.sql.Timestamp ; 44 import java.util.Collection ;import java.util.Iterator ; 47 52 public class MessageFolderBean { 53 private String folderName; 54 private int memberID; 55 private int folderOrder; 56 private int folderStatus; 57 private int folderOption; 58 private int folderType; 59 private Timestamp folderCreationDate; 60 private Timestamp folderModifiedDate; 61 62 public String getFolderName() { 63 return folderName; 64 } 65 public void setFolderName(String folderName) { 66 this.folderName = folderName; 67 } 68 69 public int getMemberID() { 70 return memberID; 71 } 72 public void setMemberID(int memberID) { 73 this.memberID = memberID; 74 } 75 76 public int getFolderOrder() { 77 return folderOrder; 78 } 79 public void setFolderOrder(int folderOrder) { 80 this.folderOrder = folderOrder; 81 } 82 83 public int getFolderStatus() { 84 return folderStatus; 85 } 86 public void setFolderStatus(int folderStatus) { 87 this.folderStatus = folderStatus; 88 } 89 90 public int getFolderOption() { 91 return folderOption; 92 } 93 public void setFolderOption(int folderOption) { 94 this.folderOption = folderOption; 95 } 96 97 public int getFolderType() { 98 return folderType; 99 } 100 public void setFolderType(int folderType) { 101 this.folderType = folderType; 102 } 103 104 public Timestamp getFolderCreationDate() { 105 return folderCreationDate; 106 } 107 public void setFolderCreationDate(Timestamp folderCreationDate) { 108 this.folderCreationDate = folderCreationDate; 109 } 110 111 public Timestamp getFolderModifiedDate() { 112 return folderModifiedDate; 113 } 114 public void setFolderModifiedDate(Timestamp folderModifiedDate) { 115 this.folderModifiedDate = folderModifiedDate; 116 } 117 118 public String getXML() { 119 StringBuffer xml = new StringBuffer (1024); 120 xml.append("<MessageFolderSection>\n"); 121 xml.append(" <Rows>\n"); 122 xml.append(" <Row>\n"); 123 xml.append(" <Column>\n"); 124 xml.append(" <Name>FolderName</Name>\n"); 125 xml.append(" <Value>").append(String.valueOf(folderName)).append("</Value>\n"); 126 xml.append(" </Column>\n"); 127 xml.append(" <Column>\n"); 128 xml.append(" <Name>MemberID</Name>\n"); 129 xml.append(" <Value>").append(String.valueOf(memberID)).append("</Value>\n"); 130 xml.append(" </Column>\n"); 131 xml.append(" <Column>\n"); 132 xml.append(" <Name>FolderOrder</Name>\n"); 133 xml.append(" <Value>").append(String.valueOf(folderOrder)).append("</Value>\n"); 134 xml.append(" </Column>\n"); 135 xml.append(" <Column>\n"); 136 xml.append(" <Name>FolderStatus</Name>\n"); 137 xml.append(" <Value>").append(String.valueOf(folderStatus)).append("</Value>\n"); 138 xml.append(" </Column>\n"); 139 xml.append(" <Column>\n"); 140 xml.append(" <Name>FolderOption</Name>\n"); 141 xml.append(" <Value>").append(String.valueOf(folderOption)).append("</Value>\n"); 142 xml.append(" </Column>\n"); 143 xml.append(" <Column>\n"); 144 xml.append(" <Name>FolderType</Name>\n"); 145 xml.append(" <Value>").append(String.valueOf(folderType)).append("</Value>\n"); 146 xml.append(" </Column>\n"); 147 xml.append(" <Column>\n"); 148 xml.append(" <Name>FolderCreationDate</Name>\n"); 149 xml.append(" <Value>").append(String.valueOf(folderCreationDate)).append("</Value>\n"); 150 xml.append(" </Column>\n"); 151 xml.append(" <Column>\n"); 152 xml.append(" <Name>FolderModifiedDate</Name>\n"); 153 xml.append(" <Value>").append(String.valueOf(folderModifiedDate)).append("</Value>\n"); 154 xml.append(" </Column>\n"); 155 xml.append(" </Row>\n"); 156 xml.append(" </Rows>\n"); 157 xml.append("</MessageFolderSection>\n"); 158 return xml.toString(); 159 } 160 161 public static String getXML(Collection objMessageFolderBeans) { 162 StringBuffer xml = new StringBuffer (1024); 163 Iterator iterator = objMessageFolderBeans.iterator(); 164 xml.append("<MessageFolderSection>\n"); 165 xml.append(" <Rows>\n"); 166 while (iterator.hasNext()) { 167 MessageFolderBean objMessageFolderBean = (MessageFolderBean)iterator.next(); 168 xml.append(" <Row>\n"); 169 xml.append(" <Column>\n"); 170 xml.append(" <Name>FolderName</Name>\n"); 171 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderName)).append("</Value>\n"); 172 xml.append(" </Column>\n"); 173 xml.append(" <Column>\n"); 174 xml.append(" <Name>MemberID</Name>\n"); 175 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.memberID)).append("</Value>\n"); 176 xml.append(" </Column>\n"); 177 xml.append(" <Column>\n"); 178 xml.append(" <Name>FolderOrder</Name>\n"); 179 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderOrder)).append("</Value>\n"); 180 xml.append(" </Column>\n"); 181 xml.append(" <Column>\n"); 182 xml.append(" <Name>FolderStatus</Name>\n"); 183 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderStatus)).append("</Value>\n"); 184 xml.append(" </Column>\n"); 185 xml.append(" <Column>\n"); 186 xml.append(" <Name>FolderOption</Name>\n"); 187 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderOption)).append("</Value>\n"); 188 xml.append(" </Column>\n"); 189 xml.append(" <Column>\n"); 190 xml.append(" <Name>FolderType</Name>\n"); 191 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderType)).append("</Value>\n"); 192 xml.append(" </Column>\n"); 193 xml.append(" <Column>\n"); 194 xml.append(" <Name>FolderCreationDate</Name>\n"); 195 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderCreationDate)).append("</Value>\n"); 196 xml.append(" </Column>\n"); 197 xml.append(" <Column>\n"); 198 xml.append(" <Name>FolderModifiedDate</Name>\n"); 199 xml.append(" <Value>").append(String.valueOf(objMessageFolderBean.folderModifiedDate)).append("</Value>\n"); 200 xml.append(" </Column>\n"); 201 xml.append(" </Row>\n"); 202 } xml.append(" </Rows>\n"); 204 xml.append("</MessageFolderSection>\n"); 205 return xml.toString(); 206 } 207 208 211 private int messageCount; 212 private int unreadMessageCount; 213 214 public int getMessageCount() { 215 return messageCount; 216 } 217 218 public void setMessageCount(int messageCount) { 219 this.messageCount = messageCount; 220 } 221 222 public int getUnreadMessageCount() { 223 return this.unreadMessageCount; 224 } 225 226 public void setUnreadMessageCount(int unreadMessageCount) { 227 this.unreadMessageCount = unreadMessageCount; 228 } 229 230 } | Popular Tags |