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

Examples of org.apache.james.mailbox.jpa.mail.model.JPAMailbox


    protected long lockedNextUid(MailboxSession session, Mailbox<Long> mailbox) throws MailboxException {
        EntityManager manager = null;
        try {
            manager = factory.createEntityManager();
            manager.getTransaction().begin();
            JPAMailbox m = manager.find(JPAMailbox.class, mailbox.getMailboxId());
            long uid = m.consumeUid();
            manager.persist(m);
            manager.getTransaction().commit();
            return uid;
        } catch (PersistenceException e) {
            if (manager != null && manager.getTransaction().isActive()) {
View Full Code Here


    protected long lockedNextModSeq(MailboxSession session, Mailbox<Long> mailbox) throws MailboxException {
        EntityManager manager = null;
        try {
            manager = factory.createEntityManager();
            manager.getTransaction().begin();
            JPAMailbox m = manager.find(JPAMailbox.class, mailbox.getMailboxId());
            long modSeq = m.consumeModSeq();
            manager.persist(m);
            manager.getTransaction().commit();
            return modSeq;
        } catch (PersistenceException e) {
            if (manager != null && manager.getTransaction().isActive()) {
View Full Code Here

        super(mailboxSessionMapperFactory, authenticator, locker);
    }
   
    @Override
    protected Mailbox<Long> doCreateMailbox(MailboxPath path, MailboxSession session) throws MailboxException {
        return  new JPAMailbox(path, randomUidValidity());
    }
View Full Code Here

        super(mailboxSessionMapperFactory, authenticator, uidProvider, locker);
    }
   
    @Override
    protected Mailbox<Long> doCreateMailbox(MailboxPath path, MailboxSession session) throws MailboxException {
        return  new JPAMailbox(path, randomUidValidity());
    }
View Full Code Here

    protected long lockedNextModSeq(MailboxSession session, Mailbox<Long> mailbox) throws MailboxException {
        EntityManager manager = null;
        try {
            manager = factory.createEntityManager();
            manager.getTransaction().begin();
            JPAMailbox m = manager.find(JPAMailbox.class, mailbox.getMailboxId());
            long modSeq = m.consumeModSeq();
            manager.persist(m);
            manager.getTransaction().commit();
            return modSeq;
        } catch (PersistenceException e) {
            if (manager != null && manager.getTransaction().isActive()) {
View Full Code Here

    protected long lockedNextUid(MailboxSession session, Mailbox<Long> mailbox) throws MailboxException {
        EntityManager manager = null;
        try {
            manager = factory.createEntityManager();
            manager.getTransaction().begin();
            JPAMailbox m = manager.find(JPAMailbox.class, mailbox.getMailboxId());
            long uid = m.consumeUid();
            manager.persist(m);
            manager.getTransaction().commit();
            return uid;
        } catch (PersistenceException e) {
            if (manager != null && manager.getTransaction().isActive()) {
View Full Code Here

        super(mailboxSessionMapperFactory, authenticator, locker, aclResolver, groupMembershipResolver);
    }
   
    @Override
    protected Mailbox<Long> doCreateMailbox(MailboxPath path, MailboxSession session) throws MailboxException {
        return  new JPAMailbox(path, randomUidValidity());
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.jpa.mail.model.JPAMailbox

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.