Examples of Hotel


Examples of org.apache.webbeans.reservation.entity.Hotel

       
        if(name.equals("") || city.equals("") || country.equals(""))
        {
            return;
        }
        Hotel hotel = new Hotel();
        hotel.setCity(city);
        hotel.setCountry(country);
        hotel.setName(name);
        hotel.setStar(star);
       
        entityManager.persist(hotel);
       
    }
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

     * @param id hotel id
     * @return hotel
     */
    public Hotel getHotelWithId(int id)
    {
        Hotel hotel = this.entityManager.find(Hotel.class, id);
       
        return hotel;
    }
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

   
   
    @Transactional
    public void updateHotel(int id, String name, int star, String city, String country)
    {
        Hotel hotel = this.entityManager.find(Hotel.class, id);
       
        hotel.setName(name);
        hotel.setStar(star);
        hotel.setCountry(country);
        hotel.setCity(city);
    }
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

   
    @Transactional
    @SuppressWarnings("unchecked")
    public void deleteHotel(int id)
    {
        Hotel hotel = this.entityManager.find(Hotel.class, id);
       
        this.entityManager.remove(hotel);
       
        Query query = this.entityManager.createQuery("select r from Reservation r where r.hotel.id=:id");
        query.setParameter("id",hotel.getId());
       
        List<Reservation> res = query.getResultList();
       
        for(Reservation r : res)
        {
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

            conversation.begin();
           
            JSFUtility.addInfoMessage("Reservation conversation with started with id : " + conversation.getId(), "");           
        }
       
        Hotel hotel = (Hotel)model.getRowData();
       
        SelectItem item = new SelectItem();
        item.setValue(hotel.getId());
        item.setLabel(hotel.getName());
       
        if(contains(item.getValue()) != null)
        {
            JSFUtility.addErrorMessage("Given hotel is already added", "");
           
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

        return null;
    }
   
    public String getForUpdate()
    {
        Hotel hotel = (Hotel) model.getRowData();
       
        this.selected = hotel;
       
        setRenderedDetailPanel(true);
       
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

            logger.debug("Some of the parameters are missing to define hotel.");
           
            return;
        }
       
        Hotel hotel = new Hotel();
        hotel.setCity(city);
        hotel.setCountry(country);
        hotel.setName(name);
        hotel.setStar(star);
       
        entityManager.persist(hotel);
       
    }
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

     * @param id hotel id
     * @return hotel
     */
    public Hotel getHotelWithId(int id)
    {
        Hotel hotel = this.entityManager.find(Hotel.class, id);
       
        return hotel;
    }
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

   
   
    @Transactional
    public void updateHotel(int id, String name, int star, String city, String country)
    {
        Hotel hotel = this.entityManager.find(Hotel.class, id);
       
        hotel.setName(name);
        hotel.setStar(star);
        hotel.setCountry(country);
        hotel.setCity(city);
    }
View Full Code Here

Examples of org.apache.webbeans.reservation.entity.Hotel

   
    @Transactional
    @SuppressWarnings("unchecked")
    public void deleteHotel(int id)
    {
        Hotel hotel = this.entityManager.find(Hotel.class, id);
       
        this.entityManager.remove(hotel);
       
        Query query = this.entityManager.createQuery("select r from Reservation r where r.hotel.id=:id");
        query.setParameter("id",hotel.getId());
       
        List<Reservation> res = query.getResultList();
       
        for(Reservation r : res)
        {
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.