@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()
AbstractRatingVectorPDAOGet the desired type of entities.
getEntityType in class AbstractRatingVectorPDAOprotected Long2DoubleMap makeVector(java.util.List<Entity> entities)
AbstractRatingVectorPDAOMake a vector from entities.
makeVector in class AbstractRatingVectorPDAOentities - The entities.