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 MemberGroupDAO { 53 54 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "MemberGroup"; 55 56 public void findByPrimaryKey(int groupID, int memberID) 57 throws ObjectNotFoundException, DatabaseException; 58 59 public void create(int groupID, String memberName, 60 int privilege, Timestamp creationDate, Timestamp modifiedDate) 61 throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException; 62 63 public void delete(int groupID, int memberID) 64 throws DatabaseException, ObjectNotFoundException; 65 66 public void delete_inGroup(int groupID) 67 throws DatabaseException; 68 69 public void delete_inMember(int memberID) 70 throws DatabaseException; 71 72 public Collection getBeans_inGroup(int groupID) 73 throws DatabaseException; 74 75 public int getNumberOfBeans_inGroup(int groupID) 76 throws AssertionException, DatabaseException; 77 78 public Collection getBeans_limit(int groupID, int offset, int rowsToReturn) 79 throws IllegalArgumentException , DatabaseException; 80 81 public void isTutor(int memberID) 82 throws ObjectNotFoundException, DatabaseException; 83 84 } 85 | Popular Tags |