1 41 package com.mvnforum.db; 42 43 import java.sql.Timestamp ; 44 import java.util.Collection ; 45 46 import net.myvietnam.mvncore.exception.*; 47 48 public interface MessageDAO { 49 50 public static final String TABLE_NAME = DatabaseConfig.TABLE_PREFIX + "Message"; 51 52 public void findByPrimaryKey(int messageID) 53 throws ObjectNotFoundException, DatabaseException; 54 55 public int create(String folderName, int memberID, int messageSenderID, 56 String messageSenderName, String messageToList, String messageCcList, 57 String messageBccList, String messageTopic, String messageBody, 58 int messageType, int messageOption, int messageStatus, 59 int messageReadStatus, int messageNotify, String messageIcon, 60 int messageAttachCount, String messageIP, Timestamp messageCreationDate) 61 throws CreateException, DatabaseException, ForeignKeyNotFoundException; 62 63 public Collection getAllMessages_inMember_inFolder_withSortSupport_limit(int memberID, String folderName, int offset, int rowsToReturn, String sort, String order) 65 throws IllegalArgumentException , DatabaseException; 66 67 public Collection getNonPublicMessages_inMember_inFolder_withSortSupport_limit(int memberID, String folderName, int offset, int rowsToReturn, String sort, String order) 69 throws IllegalArgumentException , DatabaseException; 70 71 public MessageBean getMessage(int messageID) 72 throws ObjectNotFoundException, DatabaseException; 73 74 public int getNumberOfNonPublicMessages_inMember(int memberID) 75 throws AssertionException, DatabaseException; 76 77 public void updateMessageReadStatus(int messageID, int memberID, int messageReadStatus) 78 throws ObjectNotFoundException, DatabaseException; 79 80 public void deleteMessage(int messageID, int memberID) 81 throws DatabaseException, ObjectNotFoundException; 82 83 public void deleteSenderMessages(int senderID) 84 throws DatabaseException; 85 86 public void updateAttachCount(int messageID, int messageAttachCount) 89 throws ObjectNotFoundException, DatabaseException; 90 91 public void updateFolderName(int messageID, int memberID, String folderName) 93 throws ObjectNotFoundException, DatabaseException; 94 95 public void deleteMessages_inFolderName_inMember(String folderName, int memberID) 96 throws DatabaseException; 97 98 public Collection getPublicMessages() 99 throws DatabaseException ; 100 101 public int getNumberOfNonPublicMessages_inMember_inFolder(int memberID, String folderName) 102 throws AssertionException, DatabaseException; 103 104 public int getNumberOfUnreadNonPublicMessages_inMember_inFolder(int memberID, String folderName) 105 throws AssertionException, DatabaseException; 106 107 public int getNumberOfAllMessages_inMember_inFolder(int memberID, String folderName) 108 throws AssertionException, DatabaseException; 109 110 public int getNumberOfUnreadAllMessages_inMember_inFolder(int memberID, String folderName) 111 throws AssertionException, DatabaseException; 112 113 } 114 | Popular Tags |