@ThreadSafe public class StandardRatingVectorPDAO extends java.lang.Object implements RatingVectorPDAO
Rating vector source that extracts user ratings from the database.
Constructor and Description |
---|
StandardRatingVectorPDAO(DataAccessObject dao)
Construct a rating vector source.
|
Modifier and Type | Method and Description |
---|---|
ObjectStream<IdBox<Long2DoubleMap>> |
streamUsers()
Stream all users in the data set.
|
Long2DoubleMap |
userRatingVector(long user)
Get a user’s rating vector.
|
@Inject public StandardRatingVectorPDAO(DataAccessObject dao)
Construct a rating vector source.
dao
- The data access object.@Nonnull public Long2DoubleMap userRatingVector(long user)
RatingVectorPDAO
Get a user’s rating vector.
userRatingVector
in interface RatingVectorPDAO
user
- The rating vector summarizing a user’s historical preferences.public ObjectStream<IdBox<Long2DoubleMap>> streamUsers()
RatingVectorPDAO
Stream all users in the data set.
streamUsers
in interface RatingVectorPDAO