@ThreadSafe public class CountSumRatingVectorPDAO extends AbstractRatingVectorPDAO
Rating vector DAO that sums the count
attributes for entities.
dao
Constructor and Description |
---|
CountSumRatingVectorPDAO(DataAccessObject dao,
EntityType type)
Construct a rating vector source.
|
Modifier and Type | Method and Description |
---|---|
protected EntityType |
getEntityType()
Get the desired type of entities.
|
protected Long2DoubleMap |
makeVector(java.util.List<Entity> entities)
Make a vector from entities.
|
streamUsers, userRatingVector
@Inject public CountSumRatingVectorPDAO(DataAccessObject dao, @InteractionEntityType EntityType type)
Construct a rating vector source.
dao
- The data access object.type
- An entity type. Entities of this type should have CommonAttributes.USER_ID
and CommonAttributes.ITEM_ID
attributes, and a rating vector will makeVector the number of times an item ID appears for a given user ID.protected EntityType getEntityType()
AbstractRatingVectorPDAO
Get the desired type of entities.
getEntityType
in class AbstractRatingVectorPDAO
protected Long2DoubleMap makeVector(java.util.List<Entity> entities)
AbstractRatingVectorPDAO
Make a vector from entities.
makeVector
in class AbstractRatingVectorPDAO
entities
- The entities.