⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 messagestatisticsbean.java

📁 解觖java技术中后台无法上传数给的情况
💻 JAVA
字号:
/*
 * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/db/MessageStatisticsBean.java,v 1.5 2006/04/14 17:05:26 minhnn Exp $
 * $Author: minhnn $
 * $Revision: 1.5 $
 * $Date: 2006/04/14 17:05:26 $
 *
 * ====================================================================
 *
 * Copyright (C) 2002-2006 by MyVietnam.net
 *
 * 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 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.
 *
 * 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 at MyVietnam net
 *
 * @author: Minh Nguyen  
 */
package com.mvnforum.db;

import java.sql.Timestamp;
import java.util.Collection;
import java.util.Iterator;

/*
 * Included columns: FromID, ToID, MessageCreationDate, MessageAttachCount, MessageType,
 *                   MessageOption, MessageStatus
 * Excluded columns:
 */
public class MessageStatisticsBean {
    private int fromID;
    private int toID;
    private Timestamp messageCreationDate;
    private int messageAttachCount;
    private int messageType;
    private int messageOption;
    private int messageStatus;

    public int getFromID() {
        return fromID;
    }
    public void setFromID(int fromID) {
        this.fromID = fromID;
    }

    public int getToID() {
        return toID;
    }
    public void setToID(int toID) {
        this.toID = toID;
    }

    public Timestamp getMessageCreationDate() {
        return messageCreationDate;
    }
    public void setMessageCreationDate(Timestamp messageCreationDate) {
        this.messageCreationDate = messageCreationDate;
    }

    public int getMessageAttachCount() {
        return messageAttachCount;
    }
    public void setMessageAttachCount(int messageAttachCount) {
        this.messageAttachCount = messageAttachCount;
    }

    public int getMessageType() {
        return messageType;
    }
    public void setMessageType(int messageType) {
        this.messageType = messageType;
    }

    public int getMessageOption() {
        return messageOption;
    }
    public void setMessageOption(int messageOption) {
        this.messageOption = messageOption;
    }

    public int getMessageStatus() {
        return messageStatus;
    }
    public void setMessageStatus(int messageStatus) {
        this.messageStatus = messageStatus;
    }

    public String getXML() {
        StringBuffer xml = new StringBuffer(1024);
        xml.append("<MessageStatisticsSection>\n");
        xml.append("  <Rows>\n");
        xml.append("    <Row>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>FromID</Name>\n");
        xml.append("        <Value>").append(String.valueOf(fromID)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>ToID</Name>\n");
        xml.append("        <Value>").append(String.valueOf(toID)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>MessageCreationDate</Name>\n");
        xml.append("        <Value>").append(String.valueOf(messageCreationDate)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>MessageAttachCount</Name>\n");
        xml.append("        <Value>").append(String.valueOf(messageAttachCount)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>MessageType</Name>\n");
        xml.append("        <Value>").append(String.valueOf(messageType)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>MessageOption</Name>\n");
        xml.append("        <Value>").append(String.valueOf(messageOption)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("      <Column>\n");
        xml.append("        <Name>MessageStatus</Name>\n");
        xml.append("        <Value>").append(String.valueOf(messageStatus)).append("</Value>\n");
        xml.append("      </Column>\n");
        xml.append("    </Row>\n");
        xml.append("  </Rows>\n");
        xml.append("</MessageStatisticsSection>\n");
        return xml.toString();
    }

    public static String getXML(Collection objMessageStatisticsBeans) {
        StringBuffer xml = new StringBuffer(1024);
        Iterator iterator = objMessageStatisticsBeans.iterator();
        xml.append("<MessageStatisticsSection>\n");
        xml.append("  <Rows>\n");
        while (iterator.hasNext()) {
            MessageStatisticsBean objMessageStatisticsBean = (MessageStatisticsBean)iterator.next();
            xml.append("    <Row>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>FromID</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.fromID)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>ToID</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.toID)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>MessageCreationDate</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.messageCreationDate)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>MessageAttachCount</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.messageAttachCount)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>MessageType</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.messageType)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>MessageOption</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.messageOption)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("      <Column>\n");
            xml.append("        <Name>MessageStatus</Name>\n");
            xml.append("        <Value>").append(String.valueOf(objMessageStatisticsBean.messageStatus)).append("</Value>\n");
            xml.append("      </Column>\n");
            xml.append("    </Row>\n");
        }//while
        xml.append("  </Rows>\n");
        xml.append("</MessageStatisticsSection>\n");
        return xml.toString();
    }
} //end of class MessageStatisticsBean

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -