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 MemberTutorDAO { 53 54 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "MemberTutor"; 55 56 public void findByPrimaryKey(int memberID) 57 throws ObjectNotFoundException, DatabaseException; 58 59 public void findByAlternateKey_MemberName(String memberName) 60 throws ObjectNotFoundException, DatabaseException; 61 62 public void create(int memberID, String memberName, int tutorID, 63 String tutorName, Timestamp creationDate, Timestamp expireDate, 64 int relationType, int relationOption, int relationStatus) 65 throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException; 66 67 public void delete(int memberID) 68 throws DatabaseException, ObjectNotFoundException; 69 70 public void deleteMembers_inTutor(int tutorID) 71 throws DatabaseException, ObjectNotFoundException; 72 73 public MemberTutorBean getBean(int memberID) 74 throws ObjectNotFoundException, DatabaseException; 75 76 public Collection getBeans_inTutor_limit(int tutorID, int offset, int rowsToReturn) 77 throws IllegalArgumentException , DatabaseException; 78 79 public Collection getMembers_inTutor(int tutorID) 80 throws DatabaseException; 81 82 public int getNumberOfBeans_inTutor(int tutorID) 83 throws AssertionException, DatabaseException; 84 85 public int getNumberOfMembers() 86 throws AssertionException, DatabaseException; 87 88 public Collection getBeans(int offset, int rowsToReturn) 89 throws DatabaseException; 90 91 public Collection getBeans_inExpire_limit(Timestamp expireDate, int offset, int rowsToReturn) 92 throws IllegalArgumentException , DatabaseException; 93 94 public int getNumberOfBeans_inExpire(Timestamp expireDate) 95 throws AssertionException, DatabaseException; 96 97 public void updateMember_expireDate(int memberID, Timestamp expireDate) 100 throws ObjectNotFoundException, DatabaseException; 101 102 } 103 | Popular Tags |