Beispiel #1
0
 private void listRatings(User logged) {
   List<Rating> ratings = server.find(Rating.class).findList();
   for (Rating rating : ratings) {
     if (rating.getUser().getUsername().equals(logged.getUsername())) {
       System.out.println(
           rating.getBeer().getName()
               + " ("
               + rating.getBeer().getBrewery().getName()
               + ") "
               + rating.getRating()
               + " points");
     }
   }
 }
Beispiel #2
0
 private void listUsers() {
   List<User> users = server.find(User.class).findList();
   for (User user : users) {
     System.out.println(user.getUsername());
   }
 }