|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| 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 MailboxDaoownerID - the id of the user who owns the mailboxmailboxName - fullname of the mailbox
public boolean mailboxExists(long ownerID,
String mailboxName)
MailboxDao
mailboxExists in interface MailboxDaoownerID - ID of the user who owns the mailboxmailboxName - fullname of the parent mailbox
public Mailbox createMailbox(long ownerID,
String mailboxName)
MailboxDao
createMailbox in interface MailboxDaoownerID - 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 MailboxDaosource - fullname of the mailbox to renamedest - new name for the mailbox
public List<Mailbox> getChildren(long userID,
long ownerID,
String mailboxName,
boolean subscribed)
MailboxDao
getChildren in interface MailboxDaouserID - 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 MailboxDaoownerID - ID of the user who owns the mailboxmailboxName - fullname of the parent mailbox
public List<Long> getMailboxIDList(String mailboxName)
MailboxDao
getMailboxIDList in interface MailboxDaomailboxName - fullname of the mailboxes to find
public boolean isSubscribed(long userID,
String mailboxName)
MailboxDao
isSubscribed in interface MailboxDaouserID - ID of the user
public void addSubscription(long userID,
long mailboxID,
String mailboxName)
MailboxDao
addSubscription in interface MailboxDaouserID - ID of the usermailboxID - ID of the mailbox to subscribe
public void deleteSubscription(long userID,
String mailboxName)
MailboxDao
deleteSubscription in interface MailboxDaouserID - ID of the usermailboxName - name of the mailbox to unsubscribepublic List<Long> getDeletedMessageIDList(long mailboxID)
MailboxDao
getDeletedMessageIDList in interface MailboxDaomailboxID - id of the mailbox
public void deleteMailboxes(long ownerID)
MailboxDao
deleteMailboxes in interface MailboxDaoownerID - ID of the user
public void deleteMailbox(long ownerID,
long mailboxID)
MailboxDao
deleteMailbox in interface MailboxDaoownerID - ID of the usermailboxID - ID of the mailbox
public void forbidSelectMailbox(long ownerID,
long mailboxID)
MailboxDao
forbidSelectMailbox in interface MailboxDaoownerID - ID of the usermailboxID - ID of the mailboxpublic List<PhysMessage> getDanglingMessageIDList(long ownerID)
MailboxDao
getDanglingMessageIDList in interface MailboxDaoownerID - ID of the user
public List<PhysMessage> getDanglingMessageIDList(long ownerID,
long mailboxID)
MailboxDao
getDanglingMessageIDList in interface MailboxDaoownerID - ID of the user who owns the mailboxmailboxID - ID of the mailbox
public void deleteMessages(long ownerID)
MailboxDao
deleteMessages in interface MailboxDaoownerID - ID of the user
public void deleteMessages(long ownerID,
long mailboxID)
MailboxDao
deleteMessages in interface MailboxDaoownerID - ID of the usermailboxID - ID of the mailboxpublic int getMessageCount(long mailboxID)
MailboxDao
getMessageCount in interface MailboxDaomailboxID - ID of the mailbox
public int getRecentMessageCount(long mailboxID)
MailboxDao
getRecentMessageCount in interface MailboxDaomailboxID - ID of the mailbox
public int getUnseenMessageCount(long mailboxID)
MailboxDao
getUnseenMessageCount in interface MailboxDaomailboxID - ID of the mailbox
public long getFirstUnseenMessageID(long mailboxID)
MailboxDao
getFirstUnseenMessageID in interface MailboxDaomailboxID - ID of the mailbox.
public List<Long> getGarbageMailboxList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||