1 41 package com.mvnforum.db; 42 43 import java.sql.Timestamp ; 44 import java.util.Collection ; 45 import java.util.Iterator ; 46 47 import net.myvietnam.mvncore.util.StringUtil; 48 49 55 public class PmAttachmentBean { 56 private int pmAttachID; 57 private int memberID; 58 private String pmAttachFilename; 59 private int pmAttachFileSize; 60 private String pmAttachMimeType; 61 private String pmAttachDesc; 62 private String pmAttachCreationIP; 63 private Timestamp pmAttachCreationDate; 64 private Timestamp pmAttachModifiedDate; 65 private int pmAttachDownloadCount; 66 private int pmAttachOption; 67 private int pmAttachStatus; 68 69 public int getPmAttachID() { 70 return pmAttachID; 71 } 72 public void setPmAttachID(int pmAttachID) { 73 this.pmAttachID = pmAttachID; 74 } 75 76 public int getMemberID() { 77 return memberID; 78 } 79 public void setMemberID(int memberID) { 80 this.memberID = memberID; 81 } 82 83 public String getPmAttachFilename() { 84 return pmAttachFilename; 85 } 86 public void setPmAttachFilename(String pmAttachFilename) { 87 this.pmAttachFilename = StringUtil.getEmptyStringIfNull(pmAttachFilename); 88 } 89 90 public int getPmAttachFileSize() { 91 return pmAttachFileSize; 92 } 93 public void setPmAttachFileSize(int pmAttachFileSize) { 94 this.pmAttachFileSize = pmAttachFileSize; 95 } 96 97 public String getPmAttachMimeType() { 98 return pmAttachMimeType; 99 } 100 public void setPmAttachMimeType(String pmAttachMimeType) { 101 this.pmAttachMimeType = StringUtil.getEmptyStringIfNull(pmAttachMimeType); 102 } 103 104 public String getPmAttachDesc() { 105 return pmAttachDesc; 106 } 107 public void setPmAttachDesc(String pmAttachDesc) { 108 this.pmAttachDesc = StringUtil.getEmptyStringIfNull(pmAttachDesc); 109 } 110 111 public String getPmAttachCreationIP() { 112 return pmAttachCreationIP; 113 } 114 public void setPmAttachCreationIP(String pmAttachCreationIP) { 115 this.pmAttachCreationIP = StringUtil.getEmptyStringIfNull(pmAttachCreationIP); 116 } 117 118 public Timestamp getPmAttachCreationDate() { 119 return pmAttachCreationDate; 120 } 121 public void setPmAttachCreationDate(Timestamp pmAttachCreationDate) { 122 this.pmAttachCreationDate = pmAttachCreationDate; 123 } 124 125 public Timestamp getPmAttachModifiedDate() { 126 return pmAttachModifiedDate; 127 } 128 public void setPmAttachModifiedDate(Timestamp pmAttachModifiedDate) { 129 this.pmAttachModifiedDate = pmAttachModifiedDate; 130 } 131 132 public int getPmAttachDownloadCount() { 133 return pmAttachDownloadCount; 134 } 135 public void setPmAttachDownloadCount(int pmAttachDownloadCount) { 136 this.pmAttachDownloadCount = pmAttachDownloadCount; 137 } 138 139 public int getPmAttachOption() { 140 return pmAttachOption; 141 } 142 public void setPmAttachOption(int pmAttachOption) { 143 this.pmAttachOption = pmAttachOption; 144 } 145 146 public int getPmAttachStatus() { 147 return pmAttachStatus; 148 } 149 public void setPmAttachStatus(int pmAttachStatus) { 150 this.pmAttachStatus = pmAttachStatus; 151 } 152 153 public String getXML() { 154 StringBuffer xml = new StringBuffer (1024); 155 xml.append("<PmAttachmentSection>\n"); 156 xml.append(" <Rows>\n"); 157 xml.append(" <Row>\n"); 158 xml.append(" <Column>\n"); 159 xml.append(" <Name>PmAttachID</Name>\n"); 160 xml.append(" <Value>").append(String.valueOf(pmAttachID)).append("</Value>\n"); 161 xml.append(" </Column>\n"); 162 xml.append(" <Column>\n"); 163 xml.append(" <Name>MemberID</Name>\n"); 164 xml.append(" <Value>").append(String.valueOf(memberID)).append("</Value>\n"); 165 xml.append(" </Column>\n"); 166 xml.append(" <Column>\n"); 167 xml.append(" <Name>PmAttachFilename</Name>\n"); 168 xml.append(" <Value>").append(String.valueOf(pmAttachFilename)).append("</Value>\n"); 169 xml.append(" </Column>\n"); 170 xml.append(" <Column>\n"); 171 xml.append(" <Name>PmAttachFileSize</Name>\n"); 172 xml.append(" <Value>").append(String.valueOf(pmAttachFileSize)).append("</Value>\n"); 173 xml.append(" </Column>\n"); 174 xml.append(" <Column>\n"); 175 xml.append(" <Name>PmAttachMimeType</Name>\n"); 176 xml.append(" <Value>").append(String.valueOf(pmAttachMimeType)).append("</Value>\n"); 177 xml.append(" </Column>\n"); 178 xml.append(" <Column>\n"); 179 xml.append(" <Name>PmAttachDesc</Name>\n"); 180 xml.append(" <Value>").append(String.valueOf(pmAttachDesc)).append("</Value>\n"); 181 xml.append(" </Column>\n"); 182 xml.append(" <Column>\n"); 183 xml.append(" <Name>PmAttachCreationIP</Name>\n"); 184 xml.append(" <Value>").append(String.valueOf(pmAttachCreationIP)).append("</Value>\n"); 185 xml.append(" </Column>\n"); 186 xml.append(" <Column>\n"); 187 xml.append(" <Name>PmAttachCreationDate</Name>\n"); 188 xml.append(" <Value>").append(String.valueOf(pmAttachCreationDate)).append("</Value>\n"); 189 xml.append(" </Column>\n"); 190 xml.append(" <Column>\n"); 191 xml.append(" <Name>PmAttachModifiedDate</Name>\n"); 192 xml.append(" <Value>").append(String.valueOf(pmAttachModifiedDate)).append("</Value>\n"); 193 xml.append(" </Column>\n"); 194 xml.append(" <Column>\n"); 195 xml.append(" <Name>PmAttachDownloadCount</Name>\n"); 196 xml.append(" <Value>").append(String.valueOf(pmAttachDownloadCount)).append("</Value>\n"); 197 xml.append(" </Column>\n"); 198 xml.append(" <Column>\n"); 199 xml.append(" <Name>PmAttachOption</Name>\n"); 200 xml.append(" <Value>").append(String.valueOf(pmAttachOption)).append("</Value>\n"); 201 xml.append(" </Column>\n"); 202 xml.append(" <Column>\n"); 203 xml.append(" <Name>PmAttachStatus</Name>\n"); 204 xml.append(" <Value>").append(String.valueOf(pmAttachStatus)).append("</Value>\n"); 205 xml.append(" </Column>\n"); 206 xml.append(" </Row>\n"); 207 xml.append(" </Rows>\n"); 208 xml.append("</PmAttachmentSection>\n"); 209 return xml.toString(); 210 } 211 212 public static String getXML(Collection objPmAttachmentBeans) { 213 StringBuffer xml = new StringBuffer (1024); 214 Iterator iterator = objPmAttachmentBeans.iterator(); 215 xml.append("<PmAttachmentSection>\n"); 216 xml.append(" <Rows>\n"); 217 while (iterator.hasNext()) { 218 PmAttachmentBean objPmAttachmentBean = (PmAttachmentBean)iterator.next(); 219 xml.append(" <Row>\n"); 220 xml.append(" <Column>\n"); 221 xml.append(" <Name>PmAttachID</Name>\n"); 222 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachID)).append("</Value>\n"); 223 xml.append(" </Column>\n"); 224 xml.append(" <Column>\n"); 225 xml.append(" <Name>MemberID</Name>\n"); 226 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.memberID)).append("</Value>\n"); 227 xml.append(" </Column>\n"); 228 xml.append(" <Column>\n"); 229 xml.append(" <Name>PmAttachFilename</Name>\n"); 230 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachFilename)).append("</Value>\n"); 231 xml.append(" </Column>\n"); 232 xml.append(" <Column>\n"); 233 xml.append(" <Name>PmAttachFileSize</Name>\n"); 234 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachFileSize)).append("</Value>\n"); 235 xml.append(" </Column>\n"); 236 xml.append(" <Column>\n"); 237 xml.append(" <Name>PmAttachMimeType</Name>\n"); 238 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachMimeType)).append("</Value>\n"); 239 xml.append(" </Column>\n"); 240 xml.append(" <Column>\n"); 241 xml.append(" <Name>PmAttachDesc</Name>\n"); 242 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachDesc)).append("</Value>\n"); 243 xml.append(" </Column>\n"); 244 xml.append(" <Column>\n"); 245 xml.append(" <Name>PmAttachCreationIP</Name>\n"); 246 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachCreationIP)).append("</Value>\n"); 247 xml.append(" </Column>\n"); 248 xml.append(" <Column>\n"); 249 xml.append(" <Name>PmAttachCreationDate</Name>\n"); 250 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachCreationDate)).append("</Value>\n"); 251 xml.append(" </Column>\n"); 252 xml.append(" <Column>\n"); 253 xml.append(" <Name>PmAttachModifiedDate</Name>\n"); 254 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachModifiedDate)).append("</Value>\n"); 255 xml.append(" </Column>\n"); 256 xml.append(" <Column>\n"); 257 xml.append(" <Name>PmAttachDownloadCount</Name>\n"); 258 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachDownloadCount)).append("</Value>\n"); 259 xml.append(" </Column>\n"); 260 xml.append(" <Column>\n"); 261 xml.append(" <Name>PmAttachOption</Name>\n"); 262 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachOption)).append("</Value>\n"); 263 xml.append(" </Column>\n"); 264 xml.append(" <Column>\n"); 265 xml.append(" <Name>PmAttachStatus</Name>\n"); 266 xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachStatus)).append("</Value>\n"); 267 xml.append(" </Column>\n"); 268 xml.append(" </Row>\n"); 269 } xml.append(" </Rows>\n"); 271 xml.append("</PmAttachmentSection>\n"); 272 return xml.toString(); 273 } 274 } | Popular Tags |