Class HSqlDbMailMessageHandler
- java.lang.Object
-
- com.openindex.openestate.tool.mail.db.DbMailMessageHandlerImpl
-
- com.openindex.openestate.tool.mail.db.hsql.HSqlDbMailMessageHandler
-
- All Implemented Interfaces:
DbMailMessageHandler
public class HSqlDbMailMessageHandler extends DbMailMessageHandlerImpl
HSqlDbMailMessageHandler.- Author:
- Andreas Rudolph
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description HSqlDbMailMessageHandler()
-
Method Summary
-
Methods inherited from class com.openindex.openestate.tool.mail.db.DbMailMessageHandlerImpl
getArchivedMessages, getFolder, getFolders, getFoldersForAutoRetrieval, getMessage, getPart, getSpecialFolder, getSpecialFolders, getUnseenMessagesCount, getUnseenMessagesCount, loadAddresses, loadFolderChildren, loadFolderParents, loadPartChildren, loadPartHeaders, loadPartHeaders, removeFolder, removeMessage, removePart, setMessageAnswered, setMessageArchived, setMessageForwarded, setMessageMdn, setMessageSeen
-
-
-
-
Field Detail
-
PROC_REMOVE_ADDRESSES
public static final String PROC_REMOVE_ADDRESSES
- See Also:
- Constant Field Values
-
PROC_REMOVE_FOLDERS
public static final String PROC_REMOVE_FOLDERS
- See Also:
- Constant Field Values
-
PROC_REMOVE_HEADERS
public static final String PROC_REMOVE_HEADERS
- See Also:
- Constant Field Values
-
PROC_REMOVE_MESSAGES
public static final String PROC_REMOVE_MESSAGES
- See Also:
- Constant Field Values
-
PROC_REMOVE_PARTS
public static final String PROC_REMOVE_PARTS
- See Also:
- Constant Field Values
-
PROC_SAVE_ADDRESSES
public static final String PROC_SAVE_ADDRESSES
- See Also:
- Constant Field Values
-
PROC_SAVE_FOLDERS
public static final String PROC_SAVE_FOLDERS
- See Also:
- Constant Field Values
-
PROC_SAVE_HEADERS
public static final String PROC_SAVE_HEADERS
- See Also:
- Constant Field Values
-
PROC_SAVE_MESSAGES
public static final String PROC_SAVE_MESSAGES
- See Also:
- Constant Field Values
-
PROC_SAVE_PARTS
public static final String PROC_SAVE_PARTS
- See Also:
- Constant Field Values
-
PROC_SET_MESSAGES_ANSWERED
public static final String PROC_SET_MESSAGES_ANSWERED
- See Also:
- Constant Field Values
-
PROC_SET_MESSAGES_ARCHIVED
public static final String PROC_SET_MESSAGES_ARCHIVED
- See Also:
- Constant Field Values
-
PROC_SET_MESSAGES_FORWARDED
public static final String PROC_SET_MESSAGES_FORWARDED
- See Also:
- Constant Field Values
-
PROC_SET_MESSAGES_MDN
public static final String PROC_SET_MESSAGES_MDN
- See Also:
- Constant Field Values
-
PROC_SET_MESSAGES_SEEN
public static final String PROC_SET_MESSAGES_SEEN
- See Also:
- Constant Field Values
-
VIEW_FOLDERS
public static final String VIEW_FOLDERS
- See Also:
- Constant Field Values
-
VIEW_MESSAGES
public static final String VIEW_MESSAGES
- See Also:
- Constant Field Values
-
VIEW_PARTS
public static final String VIEW_PARTS
- See Also:
- Constant Field Values
-
VIEW_PARTS_CONTENT
public static final String VIEW_PARTS_CONTENT
- See Also:
- Constant Field Values
-
VIEW_HEADERS
public static final String VIEW_HEADERS
- See Also:
- Constant Field Values
-
VIEW_ADDRESSES
public static final String VIEW_ADDRESSES
- See Also:
- Constant Field Values
-
TABLE_FOLDERS
public static final String TABLE_FOLDERS
- See Also:
- Constant Field Values
-
FIELD_FOLDER_ID
public static final String FIELD_FOLDER_ID
- See Also:
- Constant Field Values
-
FIELD_FOLDER_PARENT_ID
public static final String FIELD_FOLDER_PARENT_ID
- See Also:
- Constant Field Values
-
FIELD_FOLDER_NAME
public static final String FIELD_FOLDER_NAME
- See Also:
- Constant Field Values
-
FIELD_FOLDER_HOLDS_MESSAGES
public static final String FIELD_FOLDER_HOLDS_MESSAGES
- See Also:
- Constant Field Values
-
FIELD_FOLDER_HOLDS_FOLDERS
public static final String FIELD_FOLDER_HOLDS_FOLDERS
- See Also:
- Constant Field Values
-
FIELD_FOLDER_AUTO_RETRIEVAL
public static final String FIELD_FOLDER_AUTO_RETRIEVAL
- See Also:
- Constant Field Values
-
FIELD_FOLDER_SPECIAL_TYPE
public static final String FIELD_FOLDER_SPECIAL_TYPE
- See Also:
- Constant Field Values
-
TABLE_MESSAGES
public static final String TABLE_MESSAGES
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_ID
public static final String FIELD_MESSAGE_ID
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_SUBJECT
public static final String FIELD_MESSAGE_SUBJECT
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_FROM
public static final String FIELD_MESSAGE_FROM
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_TO
public static final String FIELD_MESSAGE_TO
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_SIZE
public static final String FIELD_MESSAGE_SIZE
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_UID
public static final String FIELD_MESSAGE_UID
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_UID_VALIDITY
public static final String FIELD_MESSAGE_UID_VALIDITY
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_MIME_ID
public static final String FIELD_MESSAGE_MIME_ID
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_HASH
public static final String FIELD_MESSAGE_HASH
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IN_REPLY_TO
public static final String FIELD_MESSAGE_IN_REPLY_TO
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_ANSWERED
public static final String FIELD_MESSAGE_IS_ANSWERED
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_ARCHIVED
public static final String FIELD_MESSAGE_IS_ARCHIVED
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_DOWNLOADED
public static final String FIELD_MESSAGE_IS_DOWNLOADED
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_DRAFT
public static final String FIELD_MESSAGE_IS_DRAFT
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_FLAGGED
public static final String FIELD_MESSAGE_IS_FLAGGED
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_FORWARDED
public static final String FIELD_MESSAGE_IS_FORWARDED
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_SEEN
public static final String FIELD_MESSAGE_IS_SEEN
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_IS_RECEIVED
public static final String FIELD_MESSAGE_IS_RECEIVED
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_HAS_ATTACHMENTS
public static final String FIELD_MESSAGE_HAS_ATTACHMENTS
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_MDN_STATUS
public static final String FIELD_MESSAGE_MDN_STATUS
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_RECEIVED_AT
public static final String FIELD_MESSAGE_RECEIVED_AT
- See Also:
- Constant Field Values
-
FIELD_MESSAGE_SENT_AT
public static final String FIELD_MESSAGE_SENT_AT
- See Also:
- Constant Field Values
-
TABLE_PARTS
public static final String TABLE_PARTS
- See Also:
- Constant Field Values
-
FIELD_PART_ID
public static final String FIELD_PART_ID
- See Also:
- Constant Field Values
-
FIELD_PART_PARENT_ID
public static final String FIELD_PART_PARENT_ID
- See Also:
- Constant Field Values
-
FIELD_PART_TYPE
public static final String FIELD_PART_TYPE
- See Also:
- Constant Field Values
-
FIELD_PART_DESCRIPTION
public static final String FIELD_PART_DESCRIPTION
- See Also:
- Constant Field Values
-
FIELD_PART_DISPOSITION
public static final String FIELD_PART_DISPOSITION
- See Also:
- Constant Field Values
-
FIELD_PART_TEXT
public static final String FIELD_PART_TEXT
- See Also:
- Constant Field Values
-
FIELD_PART_FILE_NAME
public static final String FIELD_PART_FILE_NAME
- See Also:
- Constant Field Values
-
FIELD_PART_FILE_SIZE
public static final String FIELD_PART_FILE_SIZE
- See Also:
- Constant Field Values
-
FIELD_PART_FILE_CONTENT
public static final String FIELD_PART_FILE_CONTENT
- See Also:
- Constant Field Values
-
TABLE_HEADERS
public static final String TABLE_HEADERS
- See Also:
- Constant Field Values
-
FIELD_HEADER_KEY
public static final String FIELD_HEADER_KEY
- See Also:
- Constant Field Values
-
FIELD_HEADER_VALUE
public static final String FIELD_HEADER_VALUE
- See Also:
- Constant Field Values
-
TABLE_ADDRESSES
public static final String TABLE_ADDRESSES
- See Also:
- Constant Field Values
-
FIELD_ADDRESS_TYPE
public static final String FIELD_ADDRESS_TYPE
- See Also:
- Constant Field Values
-
FIELD_ADDRESS_VALUE
public static final String FIELD_ADDRESS_VALUE
- See Also:
- Constant Field Values
-
FIELD_ADDRESS_PERSON
public static final String FIELD_ADDRESS_PERSON
- See Also:
- Constant Field Values
-
-
Method Detail
-
downloadPart
public boolean downloadPart(Connection c, long partId, OutputStream output) throws SQLException, IOException
- Specified by:
downloadPart
in interfaceDbMailMessageHandler
- Specified by:
downloadPart
in classDbMailMessageHandlerImpl
- Throws:
SQLException
IOException
-
getArchivedMessages
public DbMailMessage[] getArchivedMessages(Connection c, long[] folderIds) throws SQLException
- Specified by:
getArchivedMessages
in interfaceDbMailMessageHandler
- Specified by:
getArchivedMessages
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getFolders
public DbMailFolder[] getFolders(Connection c, long[] ids) throws SQLException
- Specified by:
getFolders
in interfaceDbMailMessageHandler
- Specified by:
getFolders
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getFoldersForAutoRetrieval
public DbMailFolder[] getFoldersForAutoRetrieval(Connection c, long[] accountIds) throws SQLException
- Specified by:
getFoldersForAutoRetrieval
in interfaceDbMailMessageHandler
- Specified by:
getFoldersForAutoRetrieval
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getFolderChildren
public DbMailFolder[] getFolderChildren(Connection c, long parentFolderId) throws SQLException
- Specified by:
getFolderChildren
in interfaceDbMailMessageHandler
- Specified by:
getFolderChildren
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getFolderOnRoot
public DbMailFolder getFolderOnRoot(Connection c, long accountId) throws SQLException
- Specified by:
getFolderOnRoot
in interfaceDbMailMessageHandler
- Specified by:
getFolderOnRoot
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getMessageFromFolder
public DbMailMessage getMessageFromFolder(Connection c, long folderId, String hash, String mimeId) throws SQLException
- Specified by:
getMessageFromFolder
in interfaceDbMailMessageHandler
- Specified by:
getMessageFromFolder
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getMessageFromFolder
public DbMailMessage getMessageFromFolder(Connection c, long folderId, long uid, long uidValidity) throws SQLException
- Specified by:
getMessageFromFolder
in interfaceDbMailMessageHandler
- Specified by:
getMessageFromFolder
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getMessages
public DbMailMessage[] getMessages(Connection c, long[] ids) throws SQLException
- Specified by:
getMessages
in interfaceDbMailMessageHandler
- Specified by:
getMessages
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getMessageIdsFromFolder
public long[] getMessageIdsFromFolder(Connection c, long folderId) throws SQLException
- Specified by:
getMessageIdsFromFolder
in interfaceDbMailMessageHandler
- Specified by:
getMessageIdsFromFolder
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getMessagesFromFolder
public DbMailMessage[] getMessagesFromFolder(Connection c, long folderId) throws SQLException
- Specified by:
getMessagesFromFolder
in interfaceDbMailMessageHandler
- Specified by:
getMessagesFromFolder
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getParts
public DbMailPart[] getParts(Connection c, long[] ids) throws SQLException
- Specified by:
getParts
in interfaceDbMailMessageHandler
- Specified by:
getParts
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getPartChildren
public DbMailPart[] getPartChildren(Connection c, long parentPartId) throws SQLException
- Specified by:
getPartChildren
in interfaceDbMailMessageHandler
- Specified by:
getPartChildren
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getPartOnRoot
public DbMailPart getPartOnRoot(Connection c, long messageId) throws SQLException
- Specified by:
getPartOnRoot
in interfaceDbMailMessageHandler
- Specified by:
getPartOnRoot
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getSpecialFolders
public DbMailFolder[] getSpecialFolders(Connection c, long accountId, DbMailFolder.SpecialType[] types) throws SQLException
- Specified by:
getSpecialFolders
in interfaceDbMailMessageHandler
- Specified by:
getSpecialFolders
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
getUnseenMessagesCount
public Map<Long,Integer> getUnseenMessagesCount(Connection c, long[] folderIds) throws SQLException
- Specified by:
getUnseenMessagesCount
in interfaceDbMailMessageHandler
- Specified by:
getUnseenMessagesCount
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
loadAddresses
public void loadAddresses(Connection c, DbMailMessage[] messages) throws SQLException
- Specified by:
loadAddresses
in interfaceDbMailMessageHandler
- Specified by:
loadAddresses
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
loadPartHeaders
public void loadPartHeaders(Connection c, DbMailPart[] parts) throws SQLException
- Specified by:
loadPartHeaders
in interfaceDbMailMessageHandler
- Specified by:
loadPartHeaders
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
removeFolders
public void removeFolders(Connection c, long[] ids) throws SQLException
- Specified by:
removeFolders
in interfaceDbMailMessageHandler
- Specified by:
removeFolders
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
removeMessages
public void removeMessages(Connection c, long[] ids) throws SQLException
- Specified by:
removeMessages
in interfaceDbMailMessageHandler
- Specified by:
removeMessages
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
removeParts
public void removeParts(Connection c, long[] ids) throws SQLException
- Specified by:
removeParts
in interfaceDbMailMessageHandler
- Specified by:
removeParts
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
saveFolder
public void saveFolder(Connection c, DbMailFolder folder) throws SQLException
- Specified by:
saveFolder
in interfaceDbMailMessageHandler
- Specified by:
saveFolder
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
saveMessage
public void saveMessage(Connection c, DbMailMessage message) throws SQLException
- Specified by:
saveMessage
in interfaceDbMailMessageHandler
- Specified by:
saveMessage
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
savePart
public void savePart(Connection c, DbMailPart part, boolean recursive) throws SQLException, IOException
- Specified by:
savePart
in interfaceDbMailMessageHandler
- Specified by:
savePart
in classDbMailMessageHandlerImpl
- Throws:
SQLException
IOException
-
setMessagesAnswered
public void setMessagesAnswered(Connection c, long[] messageIds, boolean answered) throws SQLException
- Specified by:
setMessagesAnswered
in interfaceDbMailMessageHandler
- Specified by:
setMessagesAnswered
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
setMessagesArchived
public void setMessagesArchived(Connection c, long[] messageIds, boolean archived) throws SQLException
- Specified by:
setMessagesArchived
in interfaceDbMailMessageHandler
- Specified by:
setMessagesArchived
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
setMessagesForwarded
public void setMessagesForwarded(Connection c, long[] messageIds, boolean forwarded) throws SQLException
- Specified by:
setMessagesForwarded
in interfaceDbMailMessageHandler
- Specified by:
setMessagesForwarded
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
setMessagesMdn
public void setMessagesMdn(Connection c, long[] messageIds, DbMailMessage.MdnStatus mdnStatus) throws SQLException
- Specified by:
setMessagesMdn
in interfaceDbMailMessageHandler
- Specified by:
setMessagesMdn
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
setMessagesSeen
public void setMessagesSeen(Connection c, long[] messageIds, boolean seen) throws SQLException
- Specified by:
setMessagesSeen
in interfaceDbMailMessageHandler
- Specified by:
setMessagesSeen
in classDbMailMessageHandlerImpl
- Throws:
SQLException
-
-