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 MemberCompanyDAO { 53 54 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "MemberCompany"; 55 56 public void findByPrimaryKey(int memberID) 57 throws ObjectNotFoundException, DatabaseException; 58 59 public void create(int memberID, String memberName, int companyID, 60 Timestamp creationDate, Timestamp expireDate, int isActive, 61 int relationType, int relationOption, int relationStatus) 62 throws CreateException, DatabaseException, DuplicateKeyException, ForeignKeyNotFoundException; 63 64 public void delete(int memberID, int companyID) 65 throws DatabaseException, ObjectNotFoundException; 66 67 public void delete_inMember(int memberID) 68 throws DatabaseException; 69 70 public void delete_inCompany(int companyID) 71 throws DatabaseException; 72 73 public int getCompanyIDFromMemberID(int memberID) 74 throws ObjectNotFoundException, DatabaseException; 75 76 public Collection getBeans_inCompany_limit(int companyID, int offset, int rowsToReturn) 77 throws IllegalArgumentException , DatabaseException; 78 79 public int getNumberOfBeans_inCompany(int companyID) 80 throws AssertionException, DatabaseException; 81 82 } 83 | Popular Tags |