Package com.alexnevsky.hotel.dao

Examples of com.alexnevsky.hotel.dao.OrderDAO.update()


      logger.info("Admin '" + request.getSession().getAttribute(AttributesManager.PARAM_NAME_LOGIN)
          + "'. Change order status to '" + OrderStatusEnum.CANCELLED.toString() + "' for '" + order + "'"
          + ". RemoteAddr: " + request.getRemoteAddr());

      orderDAO.update(OrderStatusEnum.CANCELLED, orderId);

      request.setAttribute(AttributesManager.ATTRIBUTE_RESULT, MessageManager.RESULT_CANCEL_ORDER_MESSAGE);

    } catch (DAOException ex) {
      logger.error(ex, ex);
View Full Code Here


      Order order = null;
      order = orderDAO.find(orderId);

      if (customer.getId().compareTo(order.getCustomerId()) == 0
          && OrderStatusEnum.UNCHECKED.equals(order.getOrderStatus())) {
        orderDAO.update(OrderStatusEnum.CANCELLED, orderId);

        logger.info("Customer '" + request.getSession().getAttribute(AttributesManager.PARAM_NAME_LOGIN)
            + "'. Change order status to '" + OrderStatusEnum.CANCELLED + "' for '" + order + "'"
            + ". RemoteAddr: " + request.getRemoteAddr());
      } else {
View Full Code Here

      room = roomDAO.find(roomId);

      Double amount = null;
      if (form != null && room != null) {
        amount = room.getNightPrice() * form.getNights();
        orderDAO.update(roomId, amount, order.getId());
        orderDAO.update(OrderStatusEnum.CHECKED, order.getId());
      }

      request.setAttribute(AttributesManager.ATTRIBUTE_RESULT, MessageManager.RESULT_SELECT_ROOM_MESSAGE);

View Full Code Here

      Double amount = null;
      if (form != null && room != null) {
        amount = room.getNightPrice() * form.getNights();
        orderDAO.update(roomId, amount, order.getId());
        orderDAO.update(OrderStatusEnum.CHECKED, order.getId());
      }

      request.setAttribute(AttributesManager.ATTRIBUTE_RESULT, MessageManager.RESULT_SELECT_ROOM_MESSAGE);

    } catch (DAOException ex) {
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.