コード例 #1
0
  @Override
  public void addBeer(
      String label,
      String description,
      double grade,
      double alcohol,
      String brewery,
      String country)
      throws Exception {

    BeerDataObject beer = new BeerDataObject();
    beer.setLabel(label);
    beer.setDescription(description);
    beer.setGrade(grade);
    beer.setAlcohol(alcohol);
    beer.setBrewery(brewery);
    beer.setCountry(country);

    beerDAO.addBeer(beer);
  }
コード例 #2
0
  @Override
  public BeerReference[] getTopBeers(Integer count) throws Exception {
    List<BeerDataObject> beers = beerDAO.getBestBeers(count);

    return beersReferencesOf(beers);
  }