Package by.bsuir.hypermarket.dao.concrete

Examples of by.bsuir.hypermarket.dao.concrete.UserDao.findAll()


      UserDao userDao = new UserDao();
      User userToBan = userDao.findEntityById(userUid);
      if (userToBan.getLogin() != null) {
        userToBan.setBan(!userToBan.isBan());
        userDao.updateEntity(userToBan);
        List<User> users = userDao.findAll();
        request.setAttribute(Commands.SHOW_USERS_LIST, users);
      }
    } catch (NumberFormatException e) {
      log.error("Can not parse user id", e);
    } catch (DaoException e) {
View Full Code Here


  public String execute(CommandParams<?> request) throws ServletException,
      IOException {
    List<User> users = null;
    AbstractDao<User> usersDao = new UserDao();
    try {
      users = usersDao.findAll();
      request.setAttribute(Commands.SHOW_USERS_LIST, users);
    } catch (DaoException e) {
      log.error("Was not able to get users data", e);
    }
    String page = ConfigurationManager.INSTANCE.getProperty(ConfigurationManager.SHOW_USERS_PAGE_PATH);
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.