Esempio n. 1
0
  public Offer getOffer(String username) {
    if (username == null) {
      return null;
    }
    List<Offer> offers = offersDAO.getOffers(username);

    if (offers.size() == 0) {
      return null;
    }
    return offers.get(0);
  }
Esempio n. 2
0
  public boolean hasOffer(String name) {
    if (name == null) {
      return false;
    }

    List<Offer> offers = offersDAO.getOffers(name);
    if (offers.size() == 0) {
      return false;
    }

    return true;
  }
Esempio n. 3
0
 public List<Offer> getCurrent() {
   return offersDAO.getOffers();
 }