*
* @param maibloxSession
* @throws MailboxException
*/
public void deleteEverything(MailboxSession mailboxSession) throws MailboxException {
final JPAMailboxMapper mapper = (JPAMailboxMapper) mailboxSessionMapperFactory.getMailboxMapper(mailboxSession);
mapper.execute(new TransactionalMapper.VoidTransaction() {
public void runVoid() throws MailboxException {
mapper.deleteAllMemberships();
}
});
mapper.execute(new TransactionalMapper.VoidTransaction() {
public void runVoid() throws MailboxException {
mapper.deleteAllMailboxes();
}
});
}