Package org.jboss.errai.demo.grocery.client.shared

Examples of org.jboss.errai.demo.grocery.client.shared.User


        // XXX Of course, this only works if all the data is local.
        // When there is a server side to this demo, we will always have to authenticate with it before
        // we can produce a User instance capable of syncing.
        List<User> users = em.createNamedQuery("allUsers", User.class).getResultList();

        final User user;
        if (users.isEmpty()) {
            user = new User();
            user.setName("me");
            em.persist(user);
            em.flush();
        }
        else {
            user = users.get(0);
View Full Code Here


    // XXX Of course, this only works if all the data is local.
    // When there is a server side to this demo, we will always have to authenticate with it before
    // we can produce a User instance capable of syncing.
    List<User> users = em.createNamedQuery("allUsers", User.class).getResultList();
   
    final User user;
    if (users.isEmpty()) {
      User newUser = new User();
      newUser.setName("me");
      em.persist(newUser);
      em.flush();
      user = newUser;
    }
    else {
View Full Code Here

    // XXX Of course, this only works if all the data is local.
    // When there is a server side to this demo, we will always have to authenticate with it before
    // we can produce a User instance capable of syncing.
    List<User> users = em.createNamedQuery("allUsers", User.class).getResultList();

    final User user;
    if (users.isEmpty()) {
      user = new User();
      user.setName("me");
      em.persist(user);
      em.flush();
    }
    else {
      user = users.get(0);
View Full Code Here

TOP

Related Classes of org.jboss.errai.demo.grocery.client.shared.User

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.