1 40 package com.mvnforum.db; 41 42 import java.sql.Timestamp ; 43 import java.util.Collection ; 44 45 import net.myvietnam.mvncore.exception.AssertionException; 46 import net.myvietnam.mvncore.exception.CreateException; 47 import net.myvietnam.mvncore.exception.DatabaseException; 48 import net.myvietnam.mvncore.exception.DuplicateKeyException; 49 import net.myvietnam.mvncore.exception.ObjectNotFoundException; 50 import net.myvietnam.mvncore.exception.ForeignKeyNotFoundException; 51 52 public interface FavoriteThreadDAO { 53 54 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "FavoriteThread"; 55 56 public void findByPrimaryKey(int memberID, int threadID) 57 throws ObjectNotFoundException, DatabaseException; 58 59 public void create(int memberID, int threadID, int forumID, 60 Timestamp favoriteCreationDate, int favoriteType, int favoriteOption, 61 int favoriteStatus) 62 throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException; 63 64 public void delete(int memberID, int threadID) 65 throws DatabaseException, ObjectNotFoundException; 66 67 public void delete_inThread(int threadID) 68 throws DatabaseException; 69 70 public void delete_inForum(int forumID) 71 throws DatabaseException; 72 73 public void delete_inMember(int memberID) 74 throws DatabaseException; 75 76 public void update_ForumID_inThread(int threadID, int forumID) 77 throws DatabaseException, ForeignKeyNotFoundException; 78 79 public Collection getFavoriteThreads_inMember(int memberID) 82 throws DatabaseException; 83 84 87 public int getNumberOfFavoriteThreads_inMember(int memberID) 88 throws AssertionException, DatabaseException; 89 } 90 | Popular Tags |