?? threaddao.java
字號:
/*
* $Header: /cvsroot/mvnforum/mvnforum/src/com/mvnforum/db/ThreadDAO.java,v 1.11 2004/03/25 13:45:56 minhnn Exp $
* $Author: minhnn $
* $Revision: 1.11 $
* $Date: 2004/03/25 13:45:56 $
*
* ====================================================================
*
* 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: Minh Nguyen minhnn@MyVietnam.net
*/
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)
throws ObjectNotFoundException, CreateException, DatabaseException, ForeignKeyNotFoundException;
public void delete(int threadID)
throws DatabaseException, ObjectNotFoundException;
public void delete_inForum(int forumID)
throws DatabaseException;
public void update_ForumID(int threadID, // primary key
int forumID)
throws ObjectNotFoundException, DatabaseException, ForeignKeyNotFoundException;
public void update_ThreadStatus(int threadID, // primary key
int threadStatus)
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 ThreadBean getBean(int threadID)
throws ObjectNotFoundException, DatabaseException;
public int getNumberOfEnableBeans_inForum(int forumID)
throws AssertionException, DatabaseException;
public int getNumberOfDisableBeans_inForum(int forumID)
throws AssertionException, DatabaseException;
public int getNumberOfEnableBeans()
throws AssertionException, DatabaseException;
public Collection getEnableBeans_withSortSupport_limit(int offset, int rowsToReturn, String sort, String order)
throws IllegalArgumentException, DatabaseException;
public int getNumberOfDisableBeans()
throws AssertionException, DatabaseException;
public Collection getDisableBeans_withSortSupport_limit(int offset, int rowsToReturn, String sort, String order)
throws IllegalArgumentException, DatabaseException;
public Collection getEnableBeans_inForum_withSortSupport_limit(int forumID, int offset, int rowsToReturn, String sort, String order)
throws IllegalArgumentException, DatabaseException;
public Collection getDisableBeans_inForum_withSortSupport_limit(int forumID, int offset, int rowsToReturn, String sort, String order)
throws IllegalArgumentException, DatabaseException;
// Should Enable only ???
public Collection getBeans_inFavorite_inMember(int memberID)
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 + -