|
What this is
Other links
The source code/* * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/db/PmAttachmentBean.java,v 1.6 2005/01/18 11:52:18 minhnn Exp $ * $Author: minhnn $ * $Revision: 1.6 $ * $Date: 2005/01/18 11:52:18 $ * * ==================================================================== * * Copyright (C) 2002-2005 by MyVietnam.net * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or any later version. * * All copyright notices regarding mvnForum MUST remain intact * in the scripts and in the outputted HTML. * The "powered by" text/logo with a link back to * http://www.mvnForum.com and http://www.MyVietnam.net in the * footer of the pages MUST remain visible when the pages * are viewed on the internet or intranet. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Support can be obtained from support forums at: * http://www.mvnForum.com/mvnforum/index * * Correspondence and Marketing Questions can be sent to: * info@MyVietnam.net * * @author: Minh Nguyen minhnn@MyVietnam.net * @author: Mai Nguyen mai.nh@MyVietnam.net */ package com.mvnforum.db; import java.sql.Timestamp; import java.util.Collection; import java.util.Iterator; import net.myvietnam.mvncore.util.StringUtil; /* * Included columns: PmAttachID, MemberID, PmAttachFilename, PmAttachFileSize, * PmAttachMimeType, PmAttachDesc, PmAttachCreationIP, PmAttachCreationDate, PmAttachModifiedDate, * PmAttachDownloadCount, PmAttachOption, PmAttachStatus * Excluded columns: */ public class PmAttachmentBean { private int pmAttachID; private int memberID; private String pmAttachFilename; private int pmAttachFileSize; private String pmAttachMimeType; private String pmAttachDesc; private String pmAttachCreationIP; private Timestamp pmAttachCreationDate; private Timestamp pmAttachModifiedDate; private int pmAttachDownloadCount; private int pmAttachOption; private int pmAttachStatus; public int getPmAttachID() { return pmAttachID; } public void setPmAttachID(int pmAttachID) { this.pmAttachID = pmAttachID; } public int getMemberID() { return memberID; } public void setMemberID(int memberID) { this.memberID = memberID; } public String getPmAttachFilename() { return pmAttachFilename; } public void setPmAttachFilename(String pmAttachFilename) { this.pmAttachFilename = StringUtil.getEmptyStringIfNull(pmAttachFilename); } public int getPmAttachFileSize() { return pmAttachFileSize; } public void setPmAttachFileSize(int pmAttachFileSize) { this.pmAttachFileSize = pmAttachFileSize; } public String getPmAttachMimeType() { return pmAttachMimeType; } public void setPmAttachMimeType(String pmAttachMimeType) { this.pmAttachMimeType = StringUtil.getEmptyStringIfNull(pmAttachMimeType); } public String getPmAttachDesc() { return pmAttachDesc; } public void setPmAttachDesc(String pmAttachDesc) { this.pmAttachDesc = StringUtil.getEmptyStringIfNull(pmAttachDesc); } public String getPmAttachCreationIP() { return pmAttachCreationIP; } public void setPmAttachCreationIP(String pmAttachCreationIP) { this.pmAttachCreationIP = StringUtil.getEmptyStringIfNull(pmAttachCreationIP); } public Timestamp getPmAttachCreationDate() { return pmAttachCreationDate; } public void setPmAttachCreationDate(Timestamp pmAttachCreationDate) { this.pmAttachCreationDate = pmAttachCreationDate; } public Timestamp getPmAttachModifiedDate() { return pmAttachModifiedDate; } public void setPmAttachModifiedDate(Timestamp pmAttachModifiedDate) { this.pmAttachModifiedDate = pmAttachModifiedDate; } public int getPmAttachDownloadCount() { return pmAttachDownloadCount; } public void setPmAttachDownloadCount(int pmAttachDownloadCount) { this.pmAttachDownloadCount = pmAttachDownloadCount; } public int getPmAttachOption() { return pmAttachOption; } public void setPmAttachOption(int pmAttachOption) { this.pmAttachOption = pmAttachOption; } public int getPmAttachStatus() { return pmAttachStatus; } public void setPmAttachStatus(int pmAttachStatus) { this.pmAttachStatus = pmAttachStatus; } public String getXML() { StringBuffer xml = new StringBuffer(1024); xml.append("<PmAttachmentSection>\n"); xml.append(" <Rows>\n"); xml.append(" <Row>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachID\n"); xml.append(" <Value>").append(String.valueOf(pmAttachID)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>MemberID\n"); xml.append(" <Value>").append(String.valueOf(memberID)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachFilename\n"); xml.append(" <Value>").append(String.valueOf(pmAttachFilename)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachFileSize\n"); xml.append(" <Value>").append(String.valueOf(pmAttachFileSize)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachMimeType\n"); xml.append(" <Value>").append(String.valueOf(pmAttachMimeType)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachDesc\n"); xml.append(" <Value>").append(String.valueOf(pmAttachDesc)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachCreationIP\n"); xml.append(" <Value>").append(String.valueOf(pmAttachCreationIP)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachCreationDate\n"); xml.append(" <Value>").append(String.valueOf(pmAttachCreationDate)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachModifiedDate\n"); xml.append(" <Value>").append(String.valueOf(pmAttachModifiedDate)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachDownloadCount\n"); xml.append(" <Value>").append(String.valueOf(pmAttachDownloadCount)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachOption\n"); xml.append(" <Value>").append(String.valueOf(pmAttachOption)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachStatus\n"); xml.append(" <Value>").append(String.valueOf(pmAttachStatus)).append("\n"); xml.append(" </Column>\n"); xml.append(" </Row>\n"); xml.append(" </Rows>\n"); xml.append("</PmAttachmentSection>\n"); return xml.toString(); } public static String getXML(Collection objPmAttachmentBeans) { StringBuffer xml = new StringBuffer(1024); Iterator iterator = objPmAttachmentBeans.iterator(); xml.append("<PmAttachmentSection>\n"); xml.append(" <Rows>\n"); while (iterator.hasNext()) { PmAttachmentBean objPmAttachmentBean = (PmAttachmentBean)iterator.next(); xml.append(" <Row>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachID\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachID)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>MemberID\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.memberID)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachFilename\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachFilename)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachFileSize\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachFileSize)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachMimeType\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachMimeType)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachDesc\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachDesc)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachCreationIP\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachCreationIP)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachCreationDate\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachCreationDate)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachModifiedDate\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachModifiedDate)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachDownloadCount\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachDownloadCount)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachOption\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachOption)).append("\n"); xml.append(" </Column>\n"); xml.append(" <Column>\n"); xml.append(" <Name>PmAttachStatus\n"); xml.append(" <Value>").append(String.valueOf(objPmAttachmentBean.pmAttachStatus)).append("\n"); xml.append(" </Column>\n"); xml.append(" </Row>\n"); }//while xml.append(" </Rows>\n"); xml.append("</PmAttachmentSection>\n"); return xml.toString(); } } //end of class PmAttachmentBean |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.