Package com.alexnevsky.hotel.dao

Examples of com.alexnevsky.hotel.dao.AbstractDAOFactory


    Boolean viewFreeRoomList = true;
    request.setAttribute(AttributesManager.ATTRIBUTE_VIEW_FREE_ROOMS_LIST, viewFreeRoomList);

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      FormDAO formDAO = daoFactory.getFormDAO();

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

      Form form = null;
View Full Code Here


    logger.info("Customer '" + request.getSession().getAttribute(AttributesManager.PARAM_NAME_LOGIN)
        + "'. Execute " + this.toString() + ". RemoteAddr: " + request.getRemoteAddr());

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      FormDAO formDAO = daoFactory.getFormDAO();
      Customer customer = (Customer) request.getSession().getAttribute(AttributesManager.ATTRIBUTE_CUSTOMER);

      Order order = null;
      order = orderDAO.find(orderId);
View Full Code Here

    Form form = null;
    Room orderRoom = null;
    List<Room> freeRoomList = null;

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      FormDAO formDAO = daoFactory.getFormDAO();
      CustomerDAO customerDAO = daoFactory.getCustomerDAO();
      RoomDAO roomDAO = daoFactory.getRoomDAO();
      CreditCardDAO creditCardDAO = daoFactory.getCreditCardDAO();

      order = orderDAO.find(this.orderId);
      form = formDAO.find(order.getFormId());

      freeRoomList = this.getFreeRooms(form);
View Full Code Here

  }

  private List<Room> getFreeRooms(Form form) throws DAOException {
    List<Room> freeRoomList = null;

    AbstractDAOFactory daoFactory = Controller.getDAOFactory();

    OrderDAO orderDAO = daoFactory.getOrderDAO();
    FormDAO formDAO = daoFactory.getFormDAO();
    RoomDAO roomDAO = daoFactory.getRoomDAO();

    Date arrival = form.getArrival();
    Integer nights = form.getNights();
    Date departure = this.getDepartureDate(arrival, nights);
View Full Code Here

    String dataToView = null;

    StringBuilder sb = new StringBuilder();

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      List<Order> orderList = null;
      orderList = orderDAO.listWhereCustomer(this.customerId);

      FormDAO formDAO = daoFactory.getFormDAO();
      Form form = null;

      RoomDAO roomDAO = daoFactory.getRoomDAO();
      Room room = null;

      for (Order order : orderList) {
        Long orderRoomId = order.getRoomId();
View Full Code Here

    String dataToView = null;

    List<Room> roomList = null;

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      RoomDAO roomDAO = daoFactory.getRoomDAO();
      roomList = roomDAO.list();
    } catch (DAOException ex) {
      logger.error(ex, ex);
      return MessageManager.DAO_EXCEPTION_ERROR_MESSAGE;
    }
View Full Code Here

    String dataToView = null;

    List<Customer> customerList = null;

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      CustomerDAO customerDAO = daoFactory.getCustomerDAO();

      customerList = customerDAO.list();
    } catch (DAOException ex) {
      logger.error(ex, ex);
      return MessageManager.DAO_EXCEPTION_ERROR_MESSAGE;
View Full Code Here

    Order order = null;
    Form form = null;
    Customer customer = null;

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      FormDAO formDAO = daoFactory.getFormDAO();
      CustomerDAO customerDAO = daoFactory.getCustomerDAO();

      order = orderDAO.find(this.orderId);
      form = formDAO.find(order.getFormId());
      customer = customerDAO.find(order.getCustomerId());
    } catch (DAOException ex) {
View Full Code Here

    String dataToView = null;

    StringBuilder sb = new StringBuilder();

    try {
      AbstractDAOFactory daoFactory = Controller.getDAOFactory();

      OrderDAO orderDAO = daoFactory.getOrderDAO();
      FormDAO formDAO = daoFactory.getFormDAO();
      CustomerDAO customerDAO = daoFactory.getCustomerDAO();
      RoomDAO roomDAO = daoFactory.getRoomDAO();
      CreditCardDAO creditCardDAO = daoFactory.getCreditCardDAO();

      List<Order> orderList = null;
      orderList = orderDAO.list();

      Customer customer = null;
View Full Code Here

TOP

Related Classes of com.alexnevsky.hotel.dao.AbstractDAOFactory

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.