|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.jdbc.core.support.JdbcDaoSupport
com.hs.mail.imap.dao.AbstractDao
com.hs.mail.imap.dao.MySqlMailboxDao
public class MySqlMailboxDao
Field Summary |
---|
Fields inherited from class org.springframework.dao.support.DaoSupport |
---|
logger |
Constructor Summary | |
---|---|
MySqlMailboxDao()
|
Method Summary | |
---|---|
void |
addSubscription(long userID,
long mailboxID,
String mailboxName)
Subscribe the mailbox. |
Mailbox |
createMailbox(long ownerID,
String mailboxName)
Create a mailbox with given name. |
void |
deleteMailbox(long ownerID,
long mailboxID)
Delete the mailbox. |
void |
deleteMailboxes(long ownerID)
Delete all the mailboxes owned by the user. |
void |
deleteMessages(long ownerID)
Delete all the messages owned by the user. |
void |
deleteMessages(long ownerID,
long mailboxID)
Delete all the messages in the mailbox. |
void |
deleteSubscription(long userID,
String mailboxName)
Unsubscribe the mailbox. |
void |
forbidSelectMailbox(long ownerID,
long mailboxID)
Set \Noselect mailbox name attribute. |
int |
getChildCount(long ownerID,
String mailboxName)
Get the child mailboxes count. |
List<Mailbox> |
getChildren(long userID,
long ownerID,
String mailboxName,
boolean subscribed)
Get all child mailboxes of named mailbox. |
List<PhysMessage> |
getDanglingMessageIDList(long ownerID)
Get the list of physical message identifiers which will be dangling pointers (pointing messages which are already deleted) after deleting all the messages owned by the user. |
List<PhysMessage> |
getDanglingMessageIDList(long ownerID,
long mailboxID)
Get the list of physical message identifiers which will be dangling pointers (pointing messages which are already deleted) after expunging the mailbox. |
List<Long> |
getDeletedMessageIDList(long mailboxID)
Get the deleted message's identifiers. |
long |
getFirstUnseenMessageID(long mailboxID)
Get the message identifier of the first unseen message. |
List<Long> |
getGarbageMailboxList()
|
Mailbox |
getMailbox(long ownerID,
String mailboxName)
Get the named mailbox. |
List<Long> |
getMailboxIDList(String mailboxName)
Get the identifiers of mailboxes whose name match the given name. |
int |
getMessageCount(long mailboxID)
Get the total message count. |
int |
getRecentMessageCount(long mailboxID)
Get the recent message count. |
int |
getUnseenMessageCount(long mailboxID)
Get the unseen message count. |
boolean |
isSubscribed(long userID,
String mailboxName)
Check whether the mailbox is subscribed. |
boolean |
mailboxExists(long ownerID,
String mailboxName)
Check whether the mailbox really exists. |
void |
renameMailbox(Mailbox source,
String dest)
Rename the mailbox. |
Methods inherited from class com.hs.mail.imap.dao.AbstractDao |
---|
duplicate, escape, queryForInt, queryForLong, queryForObject |
Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport |
---|
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, initTemplateConfig, releaseConnection, setDataSource, setJdbcTemplate |
Methods inherited from class org.springframework.dao.support.DaoSupport |
---|
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MySqlMailboxDao()
Method Detail |
---|
public Mailbox getMailbox(long ownerID, String mailboxName)
MailboxDao
getMailbox
in interface MailboxDao
ownerID
- the id of the user who owns the mailboxmailboxName
- fullname of the mailbox
public boolean mailboxExists(long ownerID, String mailboxName)
MailboxDao
mailboxExists
in interface MailboxDao
ownerID
- ID of the user who owns the mailboxmailboxName
- fullname of the parent mailbox
public Mailbox createMailbox(long ownerID, String mailboxName)
MailboxDao
createMailbox
in interface MailboxDao
ownerID
- ID of the user who owns the mailboxmailboxName
- fullname of the mailbox to create
public void renameMailbox(Mailbox source, String dest)
MailboxDao
renameMailbox
in interface MailboxDao
source
- fullname of the mailbox to renamedest
- new name for the mailboxpublic List<Mailbox> getChildren(long userID, long ownerID, String mailboxName, boolean subscribed)
MailboxDao
getChildren
in interface MailboxDao
userID
- ID of user who called this methodownerID
- ID of user who owns the mailboxmailboxName
- fullname of the parent mailboxsubscribed
- If true, only subscribed mailboxes are returned
public int getChildCount(long ownerID, String mailboxName)
MailboxDao
getChildCount
in interface MailboxDao
ownerID
- ID of the user who owns the mailboxmailboxName
- fullname of the parent mailbox
public List<Long> getMailboxIDList(String mailboxName)
MailboxDao
getMailboxIDList
in interface MailboxDao
mailboxName
- fullname of the mailboxes to find
public boolean isSubscribed(long userID, String mailboxName)
MailboxDao
isSubscribed
in interface MailboxDao
userID
- ID of the user
public void addSubscription(long userID, long mailboxID, String mailboxName)
MailboxDao
addSubscription
in interface MailboxDao
userID
- ID of the usermailboxID
- ID of the mailbox to subscribepublic void deleteSubscription(long userID, String mailboxName)
MailboxDao
deleteSubscription
in interface MailboxDao
userID
- ID of the usermailboxName
- name of the mailbox to unsubscribepublic List<Long> getDeletedMessageIDList(long mailboxID)
MailboxDao
getDeletedMessageIDList
in interface MailboxDao
mailboxID
- id of the mailbox
public void deleteMailboxes(long ownerID)
MailboxDao
deleteMailboxes
in interface MailboxDao
ownerID
- ID of the userpublic void deleteMailbox(long ownerID, long mailboxID)
MailboxDao
deleteMailbox
in interface MailboxDao
ownerID
- ID of the usermailboxID
- ID of the mailboxpublic void forbidSelectMailbox(long ownerID, long mailboxID)
MailboxDao
forbidSelectMailbox
in interface MailboxDao
ownerID
- ID of the usermailboxID
- ID of the mailboxpublic List<PhysMessage> getDanglingMessageIDList(long ownerID)
MailboxDao
getDanglingMessageIDList
in interface MailboxDao
ownerID
- ID of the user
public List<PhysMessage> getDanglingMessageIDList(long ownerID, long mailboxID)
MailboxDao
getDanglingMessageIDList
in interface MailboxDao
ownerID
- ID of the user who owns the mailboxmailboxID
- ID of the mailbox
public void deleteMessages(long ownerID)
MailboxDao
deleteMessages
in interface MailboxDao
ownerID
- ID of the userpublic void deleteMessages(long ownerID, long mailboxID)
MailboxDao
deleteMessages
in interface MailboxDao
ownerID
- ID of the usermailboxID
- ID of the mailboxpublic int getMessageCount(long mailboxID)
MailboxDao
getMessageCount
in interface MailboxDao
mailboxID
- ID of the mailbox
public int getRecentMessageCount(long mailboxID)
MailboxDao
getRecentMessageCount
in interface MailboxDao
mailboxID
- ID of the mailbox
public int getUnseenMessageCount(long mailboxID)
MailboxDao
getUnseenMessageCount
in interface MailboxDao
mailboxID
- ID of the mailbox
public long getFirstUnseenMessageID(long mailboxID)
MailboxDao
getFirstUnseenMessageID
in interface MailboxDao
mailboxID
- ID of the mailbox.
public List<Long> getGarbageMailboxList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |