1 40 package com.mvnforum.db; 41 42 import java.sql.Timestamp ; 43 import java.util.Collection ; 44 45 import net.myvietnam.mvncore.exception.CreateException; 46 import net.myvietnam.mvncore.exception.DatabaseException; 47 import net.myvietnam.mvncore.exception.ObjectNotFoundException; 48 import net.myvietnam.mvncore.exception.ForeignKeyNotFoundException; 49 50 public interface PmAttachmentDAO { 51 52 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "PmAttachment"; 53 54 public void findByPrimaryKey(int pmAttachID) 55 throws ObjectNotFoundException, DatabaseException; 56 57 public int create(int memberID, String pmAttachFilename, int pmAttachFileSize, 58 String pmAttachMimeType, String pmAttachDesc, String pmAttachCreationIP, 59 Timestamp pmAttachCreationDate, Timestamp pmAttachModifiedDate, int pmAttachDownloadCount, 60 int pmAttachOption, int pmAttachStatus) 61 throws CreateException, DatabaseException, ForeignKeyNotFoundException, ObjectNotFoundException; 62 63 public void delete(int pmAttachID) 64 throws DatabaseException, ObjectNotFoundException; 65 66 public PmAttachmentBean getPmAttachment(int pmAttachID) 67 throws ObjectNotFoundException, DatabaseException; 68 69 public void increaseDownloadCount(int pmAttachID) 70 throws DatabaseException, ObjectNotFoundException; 71 72 public Collection getPmAttachments_inMessage(int messageID) 73 throws DatabaseException; 74 75 public Collection getOrphanPmAttachments() 77 throws DatabaseException; 78 79 public void updatePmAttachOption(int pmAttachID, int pmAttachOption) 80 throws DatabaseException, ObjectNotFoundException; 81 } 82 | Popular Tags |