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

📄 threaddao.java

📁 解觖java技术中后台无法上传数给的情况
💻 JAVA
字号:
/*
 * $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/db/ThreadDAO.java,v 1.23 2006/04/14 17:05:26 minhnn Exp $
 * $Author: minhnn $
 * $Revision: 1.23 $
 * $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 net.myvietnam.mvncore.exception.AssertionException;
import net.myvietnam.mvncore.exception.CreateException;
import net.myvietnam.mvncore.exception.DatabaseException;
import net.myvietnam.mvncore.exception.ObjectNotFoundException;
import net.myvietnam.mvncore.exception.ForeignKeyNotFoundException;

public interface ThreadDAO {

    public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "Thread";

    public void findByPrimaryKey(int threadID)
        throws ObjectNotFoundException, DatabaseException;

    public int createThread(int forumID, String memberName, String lastPostMemberName,
                        String threadTopic, String threadBody, int threadVoteCount,
                        int threadVoteTotalStars, Timestamp threadCreationDate, Timestamp threadLastPostDate,
                        int threadType, int threadOption, int threadStatus,
                        int threadHasPoll, int threadViewCount, int threadReplyCount,
                        String threadIcon, int threadDuration, int threadAttachCount /* to backup */)
        throws ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException;

    public void delete(int threadID)
        throws DatabaseException, ObjectNotFoundException;

    public void delete_inForum(int forumID)
        throws DatabaseException;

    public void updateForumID(int threadID, // primary key
                               int forumID)
        throws ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException;

    public void updateThreadStatus(int threadID, // primary key
                                   int threadStatus)
        throws ObjectNotFoundException, DatabaseException;

    public void updateThreadType(int threadID, // primary key
                                 int threadType)
        throws ObjectNotFoundException, DatabaseException;

    public void updateTopic_Body_Icon(int threadID, // primary key
                                      String threadTopic, String threadBody, String threadIcon)
        throws ObjectNotFoundException, DatabaseException;

    public void increaseReplyCount(int threadID)
        throws DatabaseException, ObjectNotFoundException;

    public void updateLastPostMemberName(int threadID, // primary key
                                         String lastPostMemberName)
        throws ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException;

    public void updateLastPostDate(int threadID, // primary key
                                   Timestamp threadLastPostDate)
        throws ObjectNotFoundException, DatabaseException;

    public void updateThreadAttachCount(int threadID,
                                        int count)
        throws ObjectNotFoundException, DatabaseException;

    public ThreadBean getThread(int threadID)
        throws ObjectNotFoundException, DatabaseException;

    public int getNumberOfEnableThreads_inForum(int forumID)
        throws AssertionException, DatabaseException;

    public int getNumberOfDisableThreads_inForum(int forumID)
        throws AssertionException, DatabaseException;

    public int getNumberOfNormalEnableThreads_inForum(int forumID)
        throws AssertionException, DatabaseException;

    public int getNumberOfEnableThreads()
        throws AssertionException, DatabaseException;

    public Collection getEnableThreads_withSortSupport_limit(int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException;

    public int getNumberOfDisableThreads()
        throws AssertionException, DatabaseException;

    public Collection getDisableBeans_withSortSupport_limit(int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException;

    public Collection getNormalEnableThreads_inForum_withSortSupport_limit(int forumID, int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException;

    public Collection getAllEnableThreads_inForum_withSortSupport_limit(int forumID, int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException;

    public Collection getDisableThreads_inForum_withSortSupport_limit(int forumID, int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException;

    // Should Enable only ???
    public Collection getThreads_inFavorite_inMember(int memberID)
        throws DatabaseException;

    public Collection getEnableStickies_inForum(int forumID)
        throws DatabaseException;

    public Collection getEnableForumAnnouncements_inForum(int forumID)
        throws DatabaseException;

    public Collection getEnableGlobalAnnouncements()
        throws DatabaseException;

    public void increaseViewCount(int threadID)
        throws DatabaseException, ObjectNotFoundException;

    public void updateReplyCount(int threadID, // primary key
                                 int threadReplyCount)
        throws IllegalArgumentException, DatabaseException, ObjectNotFoundException;

    public int getPreviousEnableThread(int forumID, int threadID)
        throws DatabaseException, AssertionException;

    public int getNextEnableThread(int forumID, int threadID)
        throws DatabaseException, AssertionException;

    public Collection getEnableThreads_inGlobal(Timestamp sinceDate)
        throws DatabaseException;

    public Collection getEnableThreads_inCategory(int categoryID, Timestamp sinceDate)
        throws DatabaseException;

    public Collection getEnableThreads_inForum(int forumID, Timestamp sinceDate)
        throws DatabaseException;

    public Collection getEnableThreads_inThread(int threadID, Timestamp sinceDate)
        throws DatabaseException;

    public int getNumberOfEnableThreadsWithPendingPosts()
        throws AssertionException, DatabaseException;

    public int getNumberOfEnableThreadsWithPendingPosts_inForum(int forumID)
        throws AssertionException, DatabaseException;

    /**
     * This method is used to get enable threads that having at least one pending post (for moderation)
     *
     * Note: current implementation use the NOSCROLL method which is quite slow
     *
     * @param offset
     * @param rowsToReturn
     * @param sort
     * @param order
     * @return
     * @throws java.lang.IllegalArgumentException if the arguments are not valid
     * @throws DatabaseException
     */
    public Collection getEnableThreadsWithPendingPosts_withSortSupport_limit(int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException, ObjectNotFoundException;

    public Collection getEnableThreadsWithPendingPosts_inForum_withSortSupport_limit(int forumID, int offset, int rowsToReturn, String sort, String order)
        throws IllegalArgumentException, DatabaseException, ObjectNotFoundException;

}

⌨️ 快捷键说明

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