Package org.jboss.errai.demo.todo.shared

Examples of org.jboss.errai.demo.todo.shared.ShareList


      user = query.getSingleResult();
    } catch (NoResultException exception) {
      throw new UnknownUserException("user with email '" + email + "' is not a registered user");
    }

    ShareList shareList;
    try {
      shareList = entityManager.createNamedQuery("mySharedLists", ShareList.class)
              .setParameter("loginName", currentUser.getIdentifier()).getSingleResult();
    } catch (NoResultException e) {
      shareList = new ShareList();
      shareList.setUser(entityManager.find(TodoListUser.class, currentUser.getIdentifier()));
    }

    shareList.getSharedWith().add(user);

    entityManager.persist(shareList);
    entityManager.flush();
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.demo.todo.shared.ShareList

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.