Package org.apache.james.mailbox.jpa.mail

Examples of org.apache.james.mailbox.jpa.mail.JPAMailboxMapper


        createEntityManager().close();  
    }
   
    @Override
    public MailboxMapper<Long> createMailboxMapper(MailboxSession session) {
        return new JPAMailboxMapper(entityManagerFactory);
    }
View Full Code Here


     *
     * @param maibloxSession
     * @throws MailboxException
     */
    public void deleteEverything(MailboxSession mailboxSession) throws MailboxException {
        final JPAMailboxMapper mapper = (JPAMailboxMapper) getMapperFactory().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();
            }
        });
    }
View Full Code Here

     *
     * @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();
            }
        });
    }
View Full Code Here

        createEntityManager().close();
    }
   
    @Override
    public MailboxMapper<Long> createMailboxMapper(MailboxSession session) {
        return new JPAMailboxMapper(entityManagerFactory);
    }
View Full Code Here

     *
     * @param mailboxSession
     * @throws MailboxException
     */
    public void deleteEverything(MailboxSession mailboxSession) throws MailboxException {
        final JPAMailboxMapper mapper = (JPAMailboxMapper) getMapperFactory().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();
            }
        });
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.jpa.mail.JPAMailboxMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.