/**
   * Get a user's ratings.
   *
   * @param user The user ID.
   * @return The ratings to retrieve.
   */
  private SparseVector getUserRatingVector(long user) {
    UserHistory<Rating> history = userEvents.getEventsForUser(user, Rating.class);
    if (history == null) {
      history = History.forUser(user);
    }

    return RatingVectorUserHistorySummarizer.makeRatingVector(history);
  }
  /**
   * It is used to generate rating list from UserEventDAO.
   *
   * @param uid The user ID.
   * @param dao The UserEventDAO.
   * @return The VectorEntry list of rating.
   */
  private SparseVector makeUserVector(long uid, UserEventDAO dao) {
    UserHistory<Rating> history = dao.getEventsForUser(uid, Rating.class);
    SparseVector vector = null;
    if (history != null) {
      vector = RatingVectorUserHistorySummarizer.makeRatingVector(history);
    }

    return vector;
  }