Пример #1
0
 /**
  * returns the rating of this recipe
  *
  * @return integer rating from 1-5
  */
 public Integer getRating() {
   if (recipe != null && ui.isIsUserAuthenticated()) {
     RecipeRating temp = ratingEJB.findByUserAndRecipe(ui.getUser(), recipe);
     if (temp != null) {
       rating = temp.getRatingValue().getValue();
     }
   }
   return rating;
 }