亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? threadxml.java

?? java servlet著名論壇源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/admin/ThreadXML.java,v 1.5 2004/06/27 01:20:38 skoehler Exp $
 * $Author: skoehler $
 * $Revision: 1.5 $
 * $Date: 2004/06/27 01:20:38 $
 *
 * ====================================================================
 *
 * Copyright (C) 2002-2004 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: Igor Manic   imanic@users.sourceforge.net
 */
package com.mvnforum.admin;

import java.io.IOException;
import java.sql.Timestamp;
import java.util.*;

import com.mvnforum.admin.importexport.XMLUtil;
import com.mvnforum.admin.importexport.XMLWriter;
import com.mvnforum.db.*;
import net.myvietnam.mvncore.exception.*;
import net.myvietnam.mvncore.filter.DisableHtmlTagFilter;
import net.myvietnam.mvncore.filter.EnableHtmlTagFilter;

/**
 * @author <a href="mailto:imanic@users.sourceforge.net">Igor Manic</a>
 * @version $Revision: 1.5 $, $Date: 2004/06/27 01:20:38 $
 * <br/>
 * <code>ThreadXML</code> todo Igor: enter description
 *
 */
public class ThreadXML {

    private int threadID;
    /** Returns <code>ThreadID</code> of this thread or
      * <code>-1</code> if thread is not created yet. */
    public int getThreadID() { return threadID; }

    private int parentForumID;
    /** Returns <code>ForumID</code> of this thread's parent forum or
      * <code>-1</code> if this thread is not created yet. */
    public int getParentForumID() { return parentForumID; }

    private int parentCategoryID;
    /** Returns <code>CategoryID</code> of this thread's parent category or
      * <code>-1</code> if this thread is not created yet. */
    public int getParentCategoryID() { return parentCategoryID; }

    public ThreadXML() {
        super();
        threadID=-1;
        parentForumID=-1;
        parentCategoryID=-1;
    }

    public void setThreadID(String id) {
        threadID=XMLUtil.stringToIntDef(id, -1);
    }

    public void setParentForum(Object o)
    throws ForeignKeyNotFoundException {
        if (o instanceof ForumXML) {
            parentForumID=((ForumXML)o).getForumID();
        } else {
            throw new ForeignKeyNotFoundException("Can't find parent forum's ID");
        }
    }

    public void setParentForumID(int value) {
        if (value<0) parentForumID=-1;
        else parentForumID=value;
    }

    public void setParentCategory(Object o)
    throws ForeignKeyNotFoundException {
        if (o instanceof ForumXML) {
            parentCategoryID=((ForumXML)o).getParentCategoryID();
        } else {
            throw new ForeignKeyNotFoundException("Can't find parent category's ID");
        }
    }

    public void setParentCategoryID(int value) {
        if (value<0) parentCategoryID=-1;
        else parentCategoryID=value;
    }

    /**
     * Creates a thread. All argument values (<code>int</code>s, <code>Timestamp</code>s, ...)
     * are represented as <code>String</code>s, because of more convenient using
     * of this method for XML parsing.
     *
     * @param memberName Member that created the thread. Can be null.
     * @param lastPostMemberName Can be null.
     * @param threadTopic Thread topic.
     * @param threadBody Thread body (description).
     * @param threadVoteCount Can be null.
     * @param threadVoteTotalStars Can be null.
     * @param threadCreationDate Can be null.
     * @param threadLastPostDate Can be null.
     * @param threadType Can be null.
     * @param threadOption Can be null.
     * @param threadStatus Can be null.
     * @param threadHasPoll Can be null.
     * @param threadViewCount Can be null.
     * @param threadReplyCount Can be null.
     * @param threadIcon Can be null.
     * @param threadDuration Can be null.
     *
     * @throws CreateException
     * @throws DuplicateKeyException
     * @throws ObjectNotFoundException
     * @throws DatabaseException
     * @throws ForeignKeyNotFoundException
     */
    public void addThread(String memberName, String lastPostMemberName,
                          String threadTopic, String threadBody,
                          String threadVoteCount, String threadVoteTotalStars,
                          String threadCreationDate, String threadLastPostDate,
                          String threadType, String threadOption,
                          String threadStatus, String threadHasPoll,
                          String threadViewCount, String threadReplyCount,
                          String threadIcon, String threadDuration)
    throws CreateException, DuplicateKeyException, ObjectNotFoundException,
    DatabaseException, ForeignKeyNotFoundException {
        if (parentForumID<0) {
            throw new CreateException("Can't create a thread, because no parent forum assigned yet.");
        } else if (parentCategoryID<0) {
            throw new CreateException("Can't create a thread, because no parent category assigned yet.");
        } else if ((threadTopic==null) || (threadBody==null)) {
            throw new CreateException("Can't create a thread with empty ThreadTopic or empty ThreadBody.");
        } else {
            int threadVoteCount1;
            int threadVoteTotalStars1;
            java.sql.Timestamp threadCreationDate1;
            java.sql.Timestamp threadLastPostDate1;
            int threadType1;
            int threadOption1;
            int threadStatus1;
            int threadHasPoll1;
            int threadViewCount1;
            int threadReplyCount1;
            int threadDuration1;

            try {
                if (memberName==null) memberName="";
                if (lastPostMemberName==null) lastPostMemberName="";
                threadVoteCount1= XMLUtil.stringToIntDef(threadVoteCount, 0);
                threadVoteTotalStars1= XMLUtil.stringToIntDef(threadVoteTotalStars, 0);
                threadCreationDate1= XMLUtil.stringToSqlTimestampDefNow(threadCreationDate);
                threadLastPostDate1= XMLUtil.stringToSqlTimestampDefNull(threadLastPostDate);
                threadType1 = XMLUtil.stringToIntDef(threadType, 0);
                threadOption1 = XMLUtil.stringToIntDef(threadOption, 0);
                threadStatus1 = XMLUtil.stringToIntDef(threadStatus, 0);
                threadHasPoll1 = XMLUtil.stringToIntDef(threadHasPoll, 0);
                threadViewCount1 = XMLUtil.stringToIntDef(threadViewCount, 0);
                threadReplyCount1 = XMLUtil.stringToIntDef(threadReplyCount, 0);
                if (threadIcon==null) threadIcon="";
                threadDuration1 = XMLUtil.stringToIntDef(threadDuration, 0);
            } catch (NumberFormatException e) {
                throw new CreateException("Invalid data for a thread. Expected a number.");
            }

            threadTopic=EnableHtmlTagFilter.filter(threadTopic);
            threadBody=EnableHtmlTagFilter.filter(threadBody);
            threadIcon=EnableHtmlTagFilter.filter(threadIcon);
            this.threadID = DAOFactory.getThreadDAO().createThread(parentForumID,
                                memberName, lastPostMemberName,
                                threadTopic, threadBody,
                                threadVoteCount1, threadVoteTotalStars1,
                                threadCreationDate1, threadLastPostDate1,
                                threadType1, threadOption1, threadStatus1,
                                threadHasPoll1, threadViewCount1, threadReplyCount1,
                                threadIcon, threadDuration1);
        }
    }

    /**
     * Creates a thread watch for this thread. In order to know which thread we are
     * reffering to, this method is supposed to be called after {@link #setThreadID(String)},
     * {@link #addThread(String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String)}
     * have been called. Otherwise, this watch will be simply ignored.
     *
     * @param memberName
     * @param watchType Can be null.
     * @param watchOption Can be null.
     * @param watchStatus Can be null.
     * @param watchCreationDate Can be null.
     * @param watchLastSentDate Can be null.
     * @param watchEndDate Can be null.
     *
     * @throws BadInputException
     * @throws CreateException
     * @throws DatabaseException
     * @throws ObjectNotFoundException
     * @throws DuplicateKeyException
     * @throws ForeignKeyNotFoundException
     */
    public void addThreadWatch(String memberName,
                String watchType, String watchOption,
                String watchStatus, String watchCreationDate,
                String watchLastSentDate, String watchEndDate)
    throws BadInputException, CreateException, DatabaseException,
    ObjectNotFoundException, DuplicateKeyException, ForeignKeyNotFoundException {
        if (threadID<0) {
            throw new CreateException("Found thread watch that is not assigned to any known thread.");
        }

        int watchType1;
        int watchOption1;
        int watchStatus1;
        java.sql.Timestamp watchCreationDate1;
        java.sql.Timestamp watchLastSentDate1;
        java.sql.Timestamp watchEndDate1;

        try {
            if (memberName==null) memberName="";
            watchType1= XMLUtil.stringToIntDef(watchType, 0);
            watchOption1= XMLUtil.stringToIntDef(watchOption, 0);
            watchStatus1= XMLUtil.stringToIntDef(watchStatus, 0);
            watchCreationDate1= XMLUtil.stringToSqlTimestampDefNow(watchCreationDate);
            watchLastSentDate1= XMLUtil.stringToSqlTimestampDefNull(watchLastSentDate);
            watchEndDate1= XMLUtil.stringToSqlTimestampDefNull(watchEndDate);
        } catch (NumberFormatException e) {
            throw new CreateException("Invalid data for a thread watch. Expected a number.");
        }

        //todo Igor: Shoud I allow memberID==0 here?
        int memberID=0;
        if (!memberName.equals("")) {
            memberID=DAOFactory.getMemberDAO().getMemberIDFromMemberName(memberName);
        }
        DAOFactory.getWatchDAO().create(
             memberID, 0/*categoryID*/, threadID, 0/*forumID*/,
             watchType1, watchOption1, watchStatus1,
             watchCreationDate1, watchLastSentDate1, watchEndDate1);
    }

    public void addFavoriteThread(String memberName,
                String favoriteCreationDate, String favoriteType,
                String favoriteOption, String favoriteStatus)
    throws BadInputException, CreateException, DatabaseException,
    ObjectNotFoundException, DuplicateKeyException, ForeignKeyNotFoundException {
        if (threadID<0) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区免费视频| 北条麻妃国产九九精品视频| 久久精品国产99| 99在线精品免费| 欧美电视剧免费全集观看| 国产精品短视频| 精久久久久久久久久久| 欧美午夜精品一区| 国产精品国产馆在线真实露脸| 日本欧美在线观看| 色噜噜狠狠成人中文综合 | 国产成人a级片| 欧美区一区二区三区| 国产精品美女久久久久高潮| 日本麻豆一区二区三区视频| 91视频在线观看| 国产女人aaa级久久久级| 三级成人在线视频| 欧美午夜精品一区二区蜜桃 | 亚洲成人av资源| 99久久99久久精品国产片果冻 | 在线播放欧美女士性生活| 亚洲蜜臀av乱码久久精品蜜桃| 高清不卡一区二区| 久久精品夜色噜噜亚洲a∨| 久久精品99国产精品日本| 欧美猛男超大videosgay| 中文字幕一区在线| 成人不卡免费av| 国产欧美视频一区二区三区| 国产精品一区在线| 国产日韩欧美不卡在线| 国产精品一区二区男女羞羞无遮挡| 精品裸体舞一区二区三区| 日本在线播放一区二区三区| 91麻豆精品国产91| 麻豆91在线播放免费| 欧美电视剧在线观看完整版| 国产真实乱子伦精品视频| 久久亚洲精精品中文字幕早川悠里 | 欧洲日韩一区二区三区| 亚洲男同性恋视频| 欧洲人成人精品| 日韩av不卡在线观看| 91精品国产综合久久精品| 久久国产精品99久久人人澡| 精品国产sm最大网站| 国产一区二区福利视频| 国产色91在线| 99re这里只有精品视频首页| 亚洲日本乱码在线观看| 欧美综合一区二区三区| 五月激情六月综合| 精品国产乱码久久久久久久久| 国产一区二区在线视频| 国产精品高清亚洲| 欧美日韩视频一区二区| 久国产精品韩国三级视频| 国产欧美一区二区在线观看| 93久久精品日日躁夜夜躁欧美| 亚洲国产中文字幕在线视频综合| 欧美美女一区二区三区| 国产夫妻精品视频| 亚洲欧美经典视频| 欧美第一区第二区| 91在线视频18| 激情六月婷婷久久| 亚洲人成7777| 精品成人在线观看| 色哟哟亚洲精品| 久久99久久久久久久久久久| 中文字幕巨乱亚洲| 欧美精品第一页| 不卡免费追剧大全电视剧网站| 午夜欧美大尺度福利影院在线看| 精品第一国产综合精品aⅴ| 91麻豆国产福利精品| 日韩国产欧美在线播放| 国产精品久久久99| 日韩欧美一二三区| 色狠狠一区二区三区香蕉| 国产在线麻豆精品观看| 一区二区高清免费观看影视大全| 精品美女一区二区三区| 欧美老年两性高潮| 91丝袜呻吟高潮美腿白嫩在线观看| 老色鬼精品视频在线观看播放| 亚洲人成在线观看一区二区| 久久在线免费观看| 欧美区视频在线观看| 色拍拍在线精品视频8848| 国产麻豆成人精品| 麻豆精品新av中文字幕| 亚洲电影激情视频网站| 国产精品二三区| 欧美激情一区二区三区四区| 91精品国产综合久久精品麻豆| 一本色道久久综合亚洲精品按摩| 国产一区中文字幕| 日韩av一区二区在线影视| 亚洲一区国产视频| 自拍av一区二区三区| 国产午夜三级一区二区三| 日韩精品中文字幕在线一区| 欧美人xxxx| 91精品国产综合久久精品图片 | 日韩欧美另类在线| 91精品国产一区二区三区香蕉| 欧美日韩小视频| 欧美区在线观看| 欧美三级资源在线| 欧美日韩一区小说| 欧美视频中文一区二区三区在线观看| 成人av电影在线播放| 岛国av在线一区| 成人美女视频在线观看| 成人精品电影在线观看| 成人免费看片app下载| 成人精品一区二区三区四区 | 国产一区二区0| 国产麻豆成人精品| 成人免费毛片高清视频| 97超碰欧美中文字幕| 91免费观看在线| 91福利国产精品| 欧美性感一区二区三区| 制服丝袜在线91| 日韩欧美你懂的| 国产欧美精品日韩区二区麻豆天美| 欧美激情一区三区| 一区二区三区四区激情| 日韩成人午夜电影| 精品一区二区在线免费观看| 国产精选一区二区三区| youjizz久久| 欧美综合色免费| 日韩欧美中文一区| 国产日本亚洲高清| 亚洲欧美日韩一区二区三区在线观看 | 精品国产污网站| 久久精品水蜜桃av综合天堂| 综合av第一页| 午夜精品一区二区三区电影天堂| 麻豆成人久久精品二区三区红| 国产传媒一区在线| 欧美色窝79yyyycom| 欧美一区二区啪啪| 欧美经典一区二区| 午夜一区二区三区视频| 国产一区二区三区免费| 色婷婷亚洲一区二区三区| 日韩一级片在线观看| 国产精品欧美一级免费| 亚洲成人福利片| 顶级嫩模精品视频在线看| 777亚洲妇女| 国产精品第五页| 极品少妇xxxx精品少妇偷拍 | 欧美精品1区2区| 久久免费的精品国产v∧| 亚洲免费观看高清完整| 激情综合一区二区三区| 欧美亚洲高清一区二区三区不卡| 欧美草草影院在线视频| 亚洲伊人色欲综合网| 国产传媒一区在线| 欧美一个色资源| 一区二区三区日韩| 成人高清视频在线| 精品久久久久久久久久久久久久久 | 日本一区二区电影| 日本欧美大码aⅴ在线播放| 91原创在线视频| 国产日产欧产精品推荐色| 老司机一区二区| 欧美日韩一区二区三区免费看| 欧美高清在线视频| 国产精品911| 日韩亚洲欧美高清| 亚洲高清视频在线| 91麻豆自制传媒国产之光| 国产欧美日韩亚州综合| 老司机精品视频在线| 91精品国产综合久久久久久| 亚洲一区二区三区免费视频| 99久久精品国产一区| 国产视频一区二区在线观看| 激情国产一区二区| 日韩欧美一区电影| 日韩va亚洲va欧美va久久| 在线观看日韩一区| 一区二区三区日韩欧美精品 | 国产成人亚洲综合a∨婷婷| 欧美一卡2卡三卡4卡5免费| 同产精品九九九| 在线综合亚洲欧美在线视频| 亚洲123区在线观看| 欧美日韩免费不卡视频一区二区三区| 日韩久久一区二区| 91在线观看美女|