Examples of Hotel


Examples of it.hotel.model.hotel.Hotel

   
   
    public void testViewWithIDnonNull() throws SecurityException, NoSuchMethodException {
     
     
      Hotel hotel = new Hotel();
      hotel.setId(1);
     
      req.setMethod("GET");
      req.addParameter("locale", "en");
      req.addParameter("id", "1");
     
View Full Code Here

Examples of it.hotel.model.hotel.Hotel

   
    MultiLingualInterceptor interceptor = new MultiLingualInterceptor();
    interceptor.setLabelManager(labelManager);
    interceptor.setLocaleContainer(localeContainer);
   
    Hotel h = new Hotel();
    h.setBriefdescription("Hotel.Briefdescription");
    h.setDescription("Hotel.Description");
    h.setId(1);
   
    Hotel h1 = new Hotel();
    h1.setBriefdescription("Hotel.Briefdescription");
    h1.setDescription("Hotel.Description");
    h1.setId(2);
   
    ArrayList<Hotel> hotellist = new ArrayList<Hotel>();
    hotellist.add(h);
    hotellist.add(h1);
   
    Label label = new Label();
    label.setCode("Hotel.Briefdescription");
    label.setId(1);
    label.setLanguage("it");
    label.setText("this is something");
   
    Label label2 = new Label();
    label2.setCode("Hotel.Briefdescription");
    label2.setId(2);
    label2.setLanguage("it");
    label2.setText("this is something else");
   
   
    HotelManager hmanager = new HotelManager();
    Class cls = HotelManager.class;
   
    Method m = cls.getMethod("getAll");
   
    expect(labelManager.getLabel(1, "Hotel.Briefdescription", "it")).andReturn(label);
    expect(labelManager.getLabel(1, "Hotel.Description", "it")).andReturn(label);
    expect(labelManager.getLabel(2, "Hotel.Briefdescription", "it")).andReturn(label2);
    expect(labelManager.getLabel(2, "Hotel.Description", "it")).andReturn(label2);
    expect(localeContainer.getLocale()).andReturn("it");
    expectLastCall().anyTimes();
   
    replay(localeContainer);
    replay(labelManager);
   
    Integer i = new Integer(1);
    try {
      interceptor.afterReturning(hotellist, m, null, hmanager)
    }catch (Throwable t){
      assertTrue(false);
    }
   
    assertEquals(h.getBriefdescription(),"this is something");
    assertEquals(h1.getBriefdescription(),"this is something else");
   
    verify(labelManager);
    verify(localeContainer);
   
   
View Full Code Here

Examples of it.hotel.model.hotel.Hotel

    MultiLingualInterceptor interceptor = new MultiLingualInterceptor();
    interceptor.setLabelManager(labelManager);
    interceptor.setLocaleContainer(localeContainer);
   
   
    Hotel h = new Hotel();
    h.setBriefdescription("Hotel.Briefdescription");
    h.setDescription("Hotel.Description");
    h.setId(1);
   
    Room room = new Room();
    room.setId(1);
    room.setStructure(h);
   
View Full Code Here

Examples of it.hotel.model.hotel.Hotel

 
 
  public void testGetClass() {
   
   
    Hotel hotel = new Hotel();
   
    Class clazz = hotel.getClass();
   
    String className = clazz.getName();
   
    String[] stringNames = className.split("\\.");
   
View Full Code Here

Examples of it.hotel.model.hotel.Hotel

    MultiLingualInterceptor interceptor = new MultiLingualInterceptor();
    interceptor.setLabelManager(labelManager);
    interceptor.setLocaleContainer(localeContainer);
   
   
    Hotel h = new Hotel();
    h.setBriefdescription("Hotel.Briefdescription");
    h.setDescription("Hotel.Description");
    h.setId(1);
   
    Room room = new Room();
    room.setId(1);
    room.setStructure(h);
   
View Full Code Here

Examples of net.sourceforge.myreserve.ejb.Hotel

    @Test
    public void testCreateHotel() throws Exception
    {
        // create hotel
        em.getTransaction().begin();
        Hotel h1 = new Hotel("Test Hotel 1");
        em.persist(h1);
        em.getTransaction().commit();
        Hotel h = (Hotel) em.find(Hotel.class, h1.getHotelId());
        Assert.assertNotNull(h);

        // remove hotel
        em.getTransaction().begin();
        h = (Hotel) em.find(Hotel.class, h1.getHotelId());
View Full Code Here

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

    }
   
    public String getForUpdate()
    {
        //System.out.println("enter AdminListBean.getForUpdate");
        Hotel hotel = (Hotel) model.getRowData();
       
        adminListBean.setSelected(hotel);
       
        adminListBean.setRenderedDetailPanel(true);
       
View Full Code Here

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

        return null;
    }
   
    public String delete()
    {
        Hotel selected = (Hotel)model.getRowData();
       
        if(selected == null)
        {
            JSFUtility.addErrorMessage("Pleasee select the hotel to delete", "");
           
            return null;
        }
    
        controller.deleteHotel(selected.getId());
       
        JSFUtility.addInfoMessage("Hotel with name " + selected.getName()+ " is succesfully deleted." , "");
       
        if (adminListBean.getSelected() != null) {
            adminListBean.getSelected().setCity(null);
            adminListBean.getSelected().setCountry(null);
            adminListBean.getSelected().setName(null);
View Full Code Here

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

            JSFUtility.addInfoMessage("Reservation conversation with started with id : "
                    + userReservationBean.getConversation().getId(), "");
        }

        Hotel hotel = (Hotel) model.getRowData();

        SelectItem item = new SelectItem();
        item.setValue(hotel.getId());
        item.setLabel(hotel.getName());

        if (userReservationBean.contains(item.getValue()) != null) {
            JSFUtility.addErrorMessage("Given hotel is already added", "");

            return null;
View Full Code Here

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

       
        for(String item : keys)
        {
            ReservationModel rm = reservations.get(item);
            SelectItem si = rm.getItem();
            Hotel hotel = this.entityManager.find(Hotel.class, si.getValue());
           
            Reservation reservation = new Reservation();
           
            user.addHotel(reservation);
           
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.