Package by.bsuir.hypermarket.dao.concrete

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


      int userUid = Integer.parseInt(request.getParameter(Commands.INVERT_BAN_USER_UID));
      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);
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.