コード例 #1
0
  public String find() {
    hotel = new Hotel();
    hotel.setName(name);
    hotel.setCurrency(currency);
    hotel.setCustomerId(customer);

    setData(Utils.searchHotelIdentifiers(hotel.getName()));
    return SUCCESS;
  }
コード例 #2
0
  public String add() {
    hotel = new Hotel();
    hotel.setName(name);
    hotel.setCurrency(currency);
    hotel.setCustomerId(customer);
    hotel.setStars(stars);
    hotel = hotelManager.add(hotel);

    HotelOta expedia = new HotelOta();
    HotelOta booking = new HotelOta();
    HotelOta hotels = new HotelOta();
    HotelOta venere = new HotelOta();
    HotelOta hrs = new HotelOta();

    expedia.setCurrency(currency);
    expedia.setIdHotel(hotel.getId());
    expedia.setIdOta(1);
    expedia.setName(expediaId);
    hotelOtaManager.add(expedia);

    booking.setCurrency(currency);
    booking.setIdHotel(hotel.getId());
    booking.setIdOta(2);
    booking.setName(bookingId);
    hotelOtaManager.add(booking);

    hotels.setCurrency(currency);
    hotels.setIdHotel(hotel.getId());
    hotels.setIdOta(3);
    hotels.setName(hotelsId);
    hotelOtaManager.add(hotels);

    venere.setCurrency(currency);
    venere.setIdHotel(hotel.getId());
    venere.setIdOta(4);
    venere.setName(venereId);
    hotelOtaManager.add(venere);

    hrs.setCurrency(currency);
    hrs.setIdHotel(hotel.getId());
    hrs.setIdOta(5);
    hrs.setName(hrsId);
    hotelOtaManager.add(hrs);

    return SUCCESS;
  }