Class DbMailMessageHandlerImpl
- java.lang.Object
-
- com.openindex.openestate.tool.mail.db.DbMailMessageHandlerImpl
-
- All Implemented Interfaces:
DbMailMessageHandler
- Direct Known Subclasses:
HSqlDbMailMessageHandler
public abstract class DbMailMessageHandlerImpl extends Object implements DbMailMessageHandler
DbMailMessageHandlerImpl.- Author:
- Andreas Rudolph
-
-
Constructor Summary
Constructors Constructor Description DbMailMessageHandlerImpl()
-
Method Summary
-
-
-
Method Detail
-
downloadPart
public abstract boolean downloadPart(Connection c, long partId, OutputStream output) throws SQLException, IOException
- Specified by:
downloadPart
in interfaceDbMailMessageHandler
- Throws:
SQLException
IOException
-
getArchivedMessages
public final DbMailMessage[] getArchivedMessages(Connection c, long folderId) throws SQLException
- Specified by:
getArchivedMessages
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getArchivedMessages
public abstract DbMailMessage[] getArchivedMessages(Connection c, long[] folderIds) throws SQLException
- Specified by:
getArchivedMessages
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFolder
public final DbMailFolder getFolder(Connection c, long id) throws SQLException
- Specified by:
getFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFolders
public final DbMailFolder[] getFolders(Connection c) throws SQLException
- Specified by:
getFolders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFolders
public abstract DbMailFolder[] getFolders(Connection c, long[] ids) throws SQLException
- Specified by:
getFolders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFoldersForAutoRetrieval
public final DbMailFolder[] getFoldersForAutoRetrieval(Connection c, long accountId) throws SQLException
- Specified by:
getFoldersForAutoRetrieval
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFoldersForAutoRetrieval
public abstract DbMailFolder[] getFoldersForAutoRetrieval(Connection c, long[] accountIds) throws SQLException
- Specified by:
getFoldersForAutoRetrieval
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFolderChildren
public abstract DbMailFolder[] getFolderChildren(Connection c, long parentFolderId) throws SQLException
- Specified by:
getFolderChildren
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getFolderOnRoot
public abstract DbMailFolder getFolderOnRoot(Connection c, long accountId) throws SQLException
- Specified by:
getFolderOnRoot
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getMessage
public final DbMailMessage getMessage(Connection c, long id) throws SQLException
- Specified by:
getMessage
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getMessageFromFolder
public abstract DbMailMessage getMessageFromFolder(Connection c, long folderId, String hash, String mimeId) throws SQLException
- Specified by:
getMessageFromFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getMessageFromFolder
public abstract DbMailMessage getMessageFromFolder(Connection c, long folderId, long uid, long uidValidity) throws SQLException
- Specified by:
getMessageFromFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getMessageIdsFromFolder
public abstract long[] getMessageIdsFromFolder(Connection c, long folderId) throws SQLException
- Specified by:
getMessageIdsFromFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getMessages
public abstract DbMailMessage[] getMessages(Connection c, long[] ids) throws SQLException
- Specified by:
getMessages
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getMessagesFromFolder
public abstract DbMailMessage[] getMessagesFromFolder(Connection c, long folderId) throws SQLException
- Specified by:
getMessagesFromFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getPart
public final DbMailPart getPart(Connection c, long id) throws SQLException
- Specified by:
getPart
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getParts
public abstract DbMailPart[] getParts(Connection c, long[] ids) throws SQLException
- Specified by:
getParts
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getPartChildren
public abstract DbMailPart[] getPartChildren(Connection c, long parentPartId) throws SQLException
- Specified by:
getPartChildren
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getPartOnRoot
public abstract DbMailPart getPartOnRoot(Connection c, long messageId) throws SQLException
- Specified by:
getPartOnRoot
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getSpecialFolder
public final DbMailFolder getSpecialFolder(Connection c, long accountId, DbMailFolder.SpecialType type) throws SQLException
- Specified by:
getSpecialFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getSpecialFolders
public final DbMailFolder[] getSpecialFolders(Connection c, long accountId) throws SQLException
- Specified by:
getSpecialFolders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getSpecialFolders
public abstract DbMailFolder[] getSpecialFolders(Connection c, long accountId, DbMailFolder.SpecialType[] types) throws SQLException
- Specified by:
getSpecialFolders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getUnseenMessagesCount
public final Map<Long,Integer> getUnseenMessagesCount(Connection c) throws SQLException
- Specified by:
getUnseenMessagesCount
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getUnseenMessagesCount
public abstract Map<Long,Integer> getUnseenMessagesCount(Connection c, long[] folderIds) throws SQLException
- Specified by:
getUnseenMessagesCount
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
getUnseenMessagesCount
public final int getUnseenMessagesCount(Connection c, long folderId) throws SQLException
- Specified by:
getUnseenMessagesCount
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadAddresses
public final void loadAddresses(Connection c, DbMailMessage message) throws SQLException
- Specified by:
loadAddresses
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadAddresses
public abstract void loadAddresses(Connection c, DbMailMessage[] messages) throws SQLException
- Specified by:
loadAddresses
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadFolderChildren
public void loadFolderChildren(Connection c, DbMailFolder folder, boolean recursive) throws SQLException
- Specified by:
loadFolderChildren
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadFolderParents
public void loadFolderParents(Connection c, DbMailFolder folder, boolean recursive) throws SQLException
- Specified by:
loadFolderParents
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadPartChildren
public void loadPartChildren(Connection c, DbMailPart part, boolean recursive) throws SQLException
- Specified by:
loadPartChildren
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadPartHeaders
public final void loadPartHeaders(Connection c, DbMailPart part) throws SQLException
- Specified by:
loadPartHeaders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadPartHeaders
public final void loadPartHeaders(Connection c, DbMailPart part, boolean recursive) throws SQLException
- Specified by:
loadPartHeaders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
loadPartHeaders
public abstract void loadPartHeaders(Connection c, DbMailPart[] parts) throws SQLException
- Specified by:
loadPartHeaders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
removeFolder
public final void removeFolder(Connection c, long id) throws SQLException
- Specified by:
removeFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
removeFolders
public abstract void removeFolders(Connection c, long[] ids) throws SQLException
- Specified by:
removeFolders
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
removeMessage
public final void removeMessage(Connection c, long id) throws SQLException
- Specified by:
removeMessage
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
removeMessages
public abstract void removeMessages(Connection c, long[] ids) throws SQLException
- Specified by:
removeMessages
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
removePart
public final void removePart(Connection c, long id) throws SQLException
- Specified by:
removePart
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
removeParts
public abstract void removeParts(Connection c, long[] ids) throws SQLException
- Specified by:
removeParts
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
saveFolder
public abstract void saveFolder(Connection c, DbMailFolder folder) throws SQLException
- Specified by:
saveFolder
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
saveMessage
public abstract void saveMessage(Connection c, DbMailMessage message) throws SQLException
- Specified by:
saveMessage
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
savePart
public abstract void savePart(Connection c, DbMailPart part, boolean recursive) throws SQLException, IOException
- Specified by:
savePart
in interfaceDbMailMessageHandler
- Throws:
SQLException
IOException
-
setMessageAnswered
public final void setMessageAnswered(Connection c, long messageId, boolean answered) throws SQLException
- Specified by:
setMessageAnswered
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessageArchived
public final void setMessageArchived(Connection c, long messageId, boolean archived) throws SQLException
- Specified by:
setMessageArchived
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessageForwarded
public final void setMessageForwarded(Connection c, long messageId, boolean forwarded) throws SQLException
- Specified by:
setMessageForwarded
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessageMdn
public final void setMessageMdn(Connection c, long messageId, DbMailMessage.MdnStatus mdnStatus) throws SQLException
- Specified by:
setMessageMdn
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessageSeen
public final void setMessageSeen(Connection c, long messageId, boolean seen) throws SQLException
- Specified by:
setMessageSeen
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessagesAnswered
public abstract void setMessagesAnswered(Connection c, long[] messageIds, boolean answered) throws SQLException
- Specified by:
setMessagesAnswered
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessagesArchived
public abstract void setMessagesArchived(Connection c, long[] messageIds, boolean archived) throws SQLException
- Specified by:
setMessagesArchived
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessagesForwarded
public abstract void setMessagesForwarded(Connection c, long[] messageIds, boolean forwarded) throws SQLException
- Specified by:
setMessagesForwarded
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessagesMdn
public abstract void setMessagesMdn(Connection c, long[] messageIds, DbMailMessage.MdnStatus mdnStatus) throws SQLException
- Specified by:
setMessagesMdn
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
setMessagesSeen
public abstract void setMessagesSeen(Connection c, long[] messageIds, boolean seen) throws SQLException
- Specified by:
setMessagesSeen
in interfaceDbMailMessageHandler
- Throws:
SQLException
-
-