Package org.jayasoft.woj.server.data

Examples of org.jayasoft.woj.server.data.UserDao.update()


    public void updateUser(User[] usrs) {
        UserDao dao= WOJServer.getInstance().getDataService().getUserDao();
        for (int i = 0; i < usrs.length; i++) {
            User usr = usrs[i];
            dao.update(usr);
        }
        LOGGER.info(usrs.length + "groups successfully updated.");
    }

  public User getUser(String login) {
View Full Code Here


        for (int i = 0; i < selectedUsersId.length; i++) {
        String userId = selectedUsersId[i];
        User u = userDao.getUserById(Long.valueOf(userId));
                if (u!=null) {
                    u.setGroup(g);
                    userDao.update(u);
                }
      }
      }
      return display();
    }
View Full Code Here

        for (int i = 0; i < selectedUsersId.length; i++) {
          String userId = selectedUsersId[i];
          User u = userDao.getUserById(Long.valueOf(userId));
                if (u!=null) {
                    u.setGroup(null);
                    userDao.update(u);
                }
        }
      }
      return display();
    }
View Full Code Here

                Object object = users[i];
                if (object instanceof User) {
                    User u = (User)object;
                    uToUpdate = userDao.getUserById(new Long(u.getId()));
                    BeanHelper.copy(object, uToUpdate, User.class);
                    userDao.update(uToUpdate);
                }
            }
        }
        return null;
    }
View Full Code Here

                    User u = users[i];
                    if (uDao.getUser(u.getLogin()) == null) {
                        uDao.insert(u);
                        LOGGER.debug(u + " has been inserted.");
                    } else {
                        uDao.update(u);
                        LOGGER.debug(u + " has been updated.");
                    }
                }
                LOGGER.debug(users.length + " users synchronized.");
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.