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"); } } }
private void listUsers() { List<User> users = server.find(User.class).findList(); for (User user : users) { System.out.println(user.getUsername()); } }