Examples of CriteriaDTO


Examples of it.hotel.controller.booking.DTO.CriteriaDTO

  /**
   * @throws
   * @return
   */
  protected Object formBackingObject (HttpServletRequest req) throws Exception {
    CriteriaDTO criteriaDTO = (CriteriaDTO)super.formBackingObject(req);
    CriteriaDTO dtoSession = (CriteriaDTO) req.getSession().getAttribute("dto");
    if(dtoSession == null){
      req.getSession().setAttribute("dto", criteriaDTO);
    } else {
      criteriaDTO = dtoSession;
    }
View Full Code Here

Examples of it.hotel.controller.booking.DTO.CriteriaDTO

   * @throws
   * @return
   */
  @Override
  protected ModelAndView onSubmit(HttpServletRequest req, HttpServletResponse res, Object command, BindException errors) throws Exception {
    CriteriaDTO dto = (CriteriaDTO) command;
    if(dto.getPersons()==0){
      CriteriaDTO dtoSession = (CriteriaDTO) req.getSession().getAttribute("dto");
      dto.setPersons(dtoSession.getPersons());
      dto.setRooms(dtoSession.getRooms());
    }
   
    req.getSession().setAttribute("dto", dto);
    return new ModelAndView("redirect:/BookingFrontEnd/new.htm");
  }
View Full Code Here

Examples of it.hotel.controller.booking.DTO.CriteriaDTO

    }
   
    public void setCriteriaDTO(){
     
      //setCriteria
    dto= new CriteriaDTO();
    dto.setDestinazione("Cagliari");
    dto.setBegindate(CalendarUtils.GetDateAsString(CalendarUtils.GetToday()));
    dto.setFinishdate(CalendarUtils.GetDateAsString(CalendarUtils.GetToday()));
    dto.setRooms(1);
    dto.setPersons(2);
View Full Code Here

Examples of it.hotel.controller.booking.DTO.CriteriaDTO

      Object command, Errors errors, int page) throws Exception {
    Map map = new HashMap();
   
    BookingFrontendDTO booking = (BookingFrontendDTO)command;
    if(page==0){
      CriteriaDTO criteria =(CriteriaDTO)req.getSession().getAttribute("dto");
      createBookingFromCriteria(booking, criteria);
      Collection structuresCollection = structureManager.searchAll("city", criteria.getDestinazione());
      map.put("structures", structuresCollection);
    }
    if(page==1){
      CriteriaDTO criteria =(CriteriaDTO)req.getSession().getAttribute("dto");
      createBookingFromCriteria(booking, criteria);
      Structure structure = (Structure) structureManager.get(booking.getStructure().getId());
      map.put("result", bookingManager.getSolutionsForStructureFromCriteria(criteria,booking.getStructure(),booking.getBeginDate(),booking.getFinishDate()));
      map.put("structure", structure);
     
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.