Package com.liferay.faces.demos.dto

Examples of com.liferay.faces.demos.dto.BookingType


  public List<BookingType> getAllBookingTypes() {

    if (allBookingTypes == null) {
      allBookingTypes = new ArrayList<BookingType>();
      allBookingTypes.add(new BookingType(TYPE_ID_AIRFARE, "Airfare"));
      allBookingTypes.add(new BookingType(TYPE_ID_CRUISE, "Cruise"));
      allBookingTypes.add(new BookingType(TYPE_ID_HOTEL, "Hotel"));
      allBookingTypes.add(new BookingType(TYPE_ID_PLAY, "Play/Theatre"));
      allBookingTypes.add(new BookingType(TYPE_ID_RENTAL_CAR, "Rental Car"));
      allBookingTypes.add(new BookingType(TYPE_ID_THEME_PARK, "Theme Park"));
      allBookingTypes.add(new BookingType(TYPE_ID_TRAIN, "Train"));
    }

    return allBookingTypes;
  }
View Full Code Here


  private List<BookingType> bookingTypes;

  public BookingTypeServiceMockImpl() {

    bookingTypeMap = new HashMap<Long, BookingType>();
    bookingTypeMap.put(TYPE_ID_FLIGHT, new BookingType(TYPE_ID_FLIGHT, "flight"));
    bookingTypeMap.put(TYPE_ID_CRUISE, new BookingType(TYPE_ID_CRUISE, "cruise"));
    bookingTypeMap.put(TYPE_ID_HOTEL, new BookingType(TYPE_ID_HOTEL, "hotel"));
    bookingTypeMap.put(TYPE_ID_RESTAURANT, new BookingType(TYPE_ID_RESTAURANT, "restaurant"));
    bookingTypeMap.put(TYPE_ID_RENTAL_CAR, new BookingType(TYPE_ID_RENTAL_CAR, "rental-car"));
    bookingTypeMap.put(TYPE_ID_TRAIN, new BookingType(TYPE_ID_TRAIN, "train"));

    bookingTypes = new ArrayList<BookingType>();

    Set<Entry<Long, BookingType>> entrySet = bookingTypeMap.entrySet();

    for (Entry<Long, BookingType> mapEntry : entrySet) {
      BookingType bookingType = mapEntry.getValue();
      bookingTypes.add(bookingType);
    }
  }
View Full Code Here

  @Override
  public String getName(long bookingTypeId) {

    String name = null;
    BookingType bookingType = bookingTypeMap.get(bookingTypeId);

    if (bookingType != null) {
      name = bookingType.getBookingTypeName();
    }

    return name;
  }
View Full Code Here

TOP

Related Classes of com.liferay.faces.demos.dto.BookingType

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.