Пример #1
0
  public void rateApplication() {
    Rate r = new Rate();
    r.setRate(rate);
    r.setRateApplication(application);
    if (user.getUserId() != null) {
      r.setRateUser(user);
    }

    service.persist(r);

    List<Rate> rates = application.getRateList();
    rates.add(r);
    application.setRateList(rates);
  }
Пример #2
0
 public double findAverage(Application a) {
   return service.findApplicationRateAverage(a.getApplicationId());
 }