예제 #1
0
  /**
   * Extracts a menu item from the result set.
   *
   * @param rs Result set from which a menu item entity will be extracted.
   * @return Menu item entity.
   */
  public CatalogItem extractCatalogItem(ResultSet rs) throws SQLException {

    CatalogItem catalogItem = new CatalogItem();
    catalogItem.setHot(rs.getBoolean(Fields.CATALOG_BEAN_HOT));
    catalogItem.setId(rs.getInt(Fields.ENTITY_ID));
    catalogItem.setName(rs.getString(Fields.CATALOG_BEAN_HOTEL));
    catalogItem.setPrice(rs.getInt(Fields.CATALOG_ITEM_PRICE));
    catalogItem.setCategoryId(rs.getString(Fields.CATALOG_BEAN_CATEGORY));
    catalogItem.setPeopleQuantity(rs.getInt(Fields.CATALOG_ITEM_QUANTITY_PEOPLE));
    catalogItem.setTypeHotel(rs.getString(Fields.NEW_HOTEL_TYPE));
    return catalogItem;
  }