public class CommonTypes
extends java.lang.Object
Definitions and utiltiies for common entity types.
Modifier and Type | Field and Description |
---|---|
static EntityType |
ITEM
Type identifier for item entities.
|
static EntityType |
RATING
Type identifier for rating entities.
|
static EntityType |
USER
Type identifier for user entities.
|
Constructor and Description |
---|
CommonTypes() |
public static final EntityType USER
Type identifier for user entities. Users may have CommonAttributes.NAME
attributes, along with any other custom attributes defined by the application.
public static final EntityType ITEM
Type identifier for item entities. Items may have CommonAttributes.NAME
attributes, along with any other custom attributes defined by the application.
public static final EntityType RATING
Type identifier for rating entities.
Each rating represents the user’s expressed preference for an item. Ratings are guaranteed to have CommonAttributes.USER_ID
, CommonAttributes.ITEM_ID
, and CommonAttributes.RATING
attributes, and may have a CommonAttributes.TIMESTAMP
. They are generally accessed via the Rating
interface, unless access to additional fields is required.
Ratings should reflect the user’s current stated preference. This is a change from LensKit 2.x, where ratings are events; in LensKit 3.0, applications must update and remove rating entities to reflect the user’s actions. If actual rating application or removal events are required the application should define separate entity type(s) to describe these actions.