org.apache.james.mailbox.jpa.mail
Class JPAMailboxMapper
java.lang.Object
org.apache.james.mailbox.store.transaction.TransactionalMapper
org.apache.james.mailbox.jpa.JPATransactionalMapper
org.apache.james.mailbox.jpa.mail.JPAMailboxMapper
- All Implemented Interfaces:
- MailboxMapper<Long>, Mapper
public class JPAMailboxMapper
- extends JPATransactionalMapper
- implements MailboxMapper<Long>
Data access management for mailbox.
|
Constructor Summary |
JPAMailboxMapper(javax.persistence.EntityManagerFactory entityManagerFactory)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JPAMailboxMapper
public JPAMailboxMapper(javax.persistence.EntityManagerFactory entityManagerFactory)
commit
protected void commit()
throws MailboxException
- Commit the transaction. If the commit fails due a conflict in a unique key constraint a
MailboxExistsException
will get thrown
- Overrides:
commit in class JPATransactionalMapper
- Throws:
MailboxException
save
public void save(Mailbox<Long> mailbox)
throws MailboxException
- Specified by:
save in interface MailboxMapper<Long>
- Throws:
MailboxException- See Also:
MailboxMapper.save(Mailbox)
findMailboxByPath
public Mailbox<Long> findMailboxByPath(MailboxPath mailboxPath)
throws MailboxException,
MailboxNotFoundException
- Specified by:
findMailboxByPath in interface MailboxMapper<Long>
- Throws:
MailboxException
MailboxNotFoundException- See Also:
org.apache.james.mailbox.store.mail.MailboxMapper#findMailboxByPath(java.lang.String)
delete
public void delete(Mailbox<Long> mailbox)
throws MailboxException
- Specified by:
delete in interface MailboxMapper<Long>
- Throws:
MailboxException- See Also:
MailboxMapper.delete(Mailbox)
findMailboxWithPathLike
public List<Mailbox<Long>> findMailboxWithPathLike(MailboxPath path)
throws MailboxException
- Specified by:
findMailboxWithPathLike in interface MailboxMapper<Long>
- Throws:
MailboxException
deleteAllMemberships
public void deleteAllMemberships()
throws MailboxException
- Throws:
MailboxException
deleteAllMailboxes
public void deleteAllMailboxes()
throws MailboxException
- Throws:
MailboxException
hasChildren
public boolean hasChildren(Mailbox<Long> mailbox,
char delimiter)
throws MailboxException,
MailboxNotFoundException
- Specified by:
hasChildren in interface MailboxMapper<Long>
- Throws:
MailboxException
MailboxNotFoundException- See Also:
org.apache.james.mailbox.store.mail.MailboxMapper#hasChildren(java.lang.String)
list
public List<Mailbox<Long>> list()
throws MailboxException
- Specified by:
list in interface MailboxMapper<Long>
- Throws:
MailboxException
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.