1 40 package com.mvnforum.db; 41 42 import java.util.Collection ; 43 44 import net.myvietnam.mvncore.exception.CreateException; 45 import net.myvietnam.mvncore.exception.DatabaseException; 46 import net.myvietnam.mvncore.exception.DuplicateKeyException; 47 import net.myvietnam.mvncore.exception.ObjectNotFoundException; 48 49 public interface RankDAO { 50 51 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "Rank"; 52 53 public void findByAlternateKey_RankTitle(String rankTitle) 54 throws ObjectNotFoundException, DatabaseException; 55 56 public void findByAlternateKey_RankMinPosts(int rankMinPosts) 57 throws ObjectNotFoundException, DatabaseException; 58 59 public void create(int rankMinPosts, int rankLevel, String rankTitle, 60 String rankImage, int rankType, int rankOption) 61 throws CreateException, DatabaseException, DuplicateKeyException; 62 63 public void update(int rankID, int rankMinPosts, int rankLevel, String rankTitle, 65 String rankImage, int rankType, int rankOption) 66 throws ObjectNotFoundException, DatabaseException, DuplicateKeyException; 67 68 public void delete(int rankID) 69 throws DatabaseException, ObjectNotFoundException; 70 71 public RankBean getRank(int rankID) 72 throws ObjectNotFoundException, DatabaseException; 73 74 public Collection getRanks() 75 throws DatabaseException; 76 77 public int getRankIDFromRankTitle(String rankTitle) 78 throws ObjectNotFoundException, DatabaseException; 79 80 } 81 | Popular Tags |