Package it.hotel.model.structure

Examples of it.hotel.model.structure.Structure


      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);
     
    }
    if(page==2){
View Full Code Here


 
 
  public ModelAndView list(HttpServletRequest req, HttpServletResponse resp) {
   
    IUser user = userContainer.getUser();
    Structure structure = (Structure) structureManager.get(user.getStructureId());
    ArrayList<Structure> hotels = new ArrayList<Structure>();
    hotels.add(structure);
    if (userContainer.getUser().getRole().hasPermission("SUPERUSER"))
    {
      return new ModelAndView("hotel.structure.list.admin","elements", hotels);
View Full Code Here

  @Override
  protected void doSubmitAction (Object command){
    PriceListDTO priceListDTO = (PriceListDTO)command;
    int id = priceListDTO.getTypologyId();
    Typology typology = (Typology)typologyManager.get(id);
    Structure structure = typology.getStructure();
    priceListDTO.setTypology(typology);
    double price_double = Double.parseDouble(priceListDTO.getPrice());
    BigDecimal priceValue = BigDecimal.valueOf(price_double);
   
    if (priceListDTO.getId() == 0){
View Full Code Here

    if(id != null){
      if (locale != null)
      {
        localeContainer.setLocale(locale);
      }
      Structure hotel = (Structure) this.getStructure(Integer.parseInt(id));
      hotel.setLocale(localeContainer.getLocale());
      String clazz = hotel.getType();
      localeContainer.setLocale(oldLocale);
          return new ModelAndView("add" + clazz, "structure", hotel);     
    }
    return new ModelAndView("redirect:/Structure/list.htm");
    }
View Full Code Here

   * @return
   */
  private String getClassFirstUpper(HttpServletRequest req) {
   
    String id = req.getParameter("id");
    Structure structure = (Structure) structureManager.get(Integer.parseInt(id));
    String clazz = structure.getType();
    return clazz;
  }
View Full Code Here

   * @return
   */
  private String getClassFirstLower(HttpServletRequest req) {
   
    String id = req.getParameter("id");
    Structure structure = (Structure) structureManager.get(Integer.parseInt(id));
    String clazz = structure.getType().toLowerCase();
    return clazz; 
  }
View Full Code Here

    String id = req.getParameter("id");
    String type = req.getParameter("type");
    try {
      byte[] image = null;
      if("hotel".equals(type)){
        Structure structure = (Structure) structureManager.get(Integer.parseInt(id));
        image = structure.getImage();
      }
      OutputStream out= res.getOutputStream();
      out.write(image)
      out.close();
     
View Full Code Here

  @Override
  protected Map referenceData (HttpServletRequest req) throws Exception{
    Map map = new HashMap ();
    User user = userContainer.getUser();
    int hotelId = user.getStructureId();
    Structure hotel = (Structure) structureManager.get(hotelId);
        Gallery gallery = (Gallery) galleryManager.get(hotel.getGallery().getId());
    Set<Photo> photos = gallery.getPhotos();
    map.put("hotel", hotel);
    map.put("photos", photos);
    return map;
  }
View Full Code Here

    String path = context.getRealPath("/");
    namePhoto = java.util.UUID.randomUUID().toString();
    photo.setName(namePhoto);
    User user = userContainer.getUser();
    int hotelId = user.getStructureId();
    Structure hotel = (Structure) structureManager.get(hotelId);
    ImageUtils.upload(namePhoto, path, image, hotelId, hotelId, 400, 400, "big");
    baseUrlPhoto =ImageUtils.upload(namePhoto, path, image, hotelId, hotelId, 50, 50, "small");
    photo.setUrl(baseUrlPhoto);
    photo.setGallery(hotel.getGallery());
   
    String locale = localeContainer.getLocale();
   
    String photoLocale = (String) request.getParameter("locale");
   
View Full Code Here

   * @return
   */
  @Override
  protected Map referenceData (HttpServletRequest req) throws Exception{
    Map map = new HashMap();
    Structure structure = new Structure();
    String locale = localeContainer.getLocale();
    structure.setLocale(locale);
    map.put("locale", locale);
    return map;
  }
View Full Code Here

TOP

Related Classes of it.hotel.model.structure.Structure

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.