Interface | Description |
---|---|
EventDAO |
Basic interface for accessing events.
|
ItemDAO |
DAO for items.
|
ItemEventDAO |
DAO to retrieve events by item.
|
UserDAO |
DAO for users.
|
UserEventDAO |
DAO to retrieve events by user.
|
Class | Description |
---|---|
DelimitedTextRatingCursor |
Cursor that parses arbitrary delimited text.
|
EventCollectionDAO |
Data source backed by a collection of events.
|
ItemListItemDAO |
An item DAO that stores a precomputed list of items.
|
PrefetchingItemDAO |
Item DAO that streams the events to get item information.
|
PrefetchingItemEventDAO |
Item event DAO that pre-loads all events from an event DAO.
|
PrefetchingUserDAO |
User DAO that streams the events to get user information.
|
PrefetchingUserEventDAO |
User event DAO that pre-loads all events from an event DAO.
|
SimpleFileItemDAOProvider |
Provider for
ItemListItemDAO that reads a list of item IDs from a file, one per line. |
SimpleFileRatingDAO |
Rating-only data source backed by a simple delimited file.
|
SimpleFileUserDAOProvider |
Provider for
UserListUserDAO that reads a list of user IDs from a file, one per line. |
UserListUserDAO |
A user DAO that stores a precomputed list of users.
|
Enum | Description |
---|---|
SortOrder |
Exception | Description |
---|---|
DataAccessException |
An error occurred during data access.
|
Annotation Type | Description |
---|---|
FieldSeparator |
Field separator for delimited text files.
|
ItemFile |
Item list file for
SimpleFileItemDAOProvider . |
RatingFile |
Rating file for
SimpleFileRatingDAO . |
UserFile |
User list file for
SimpleFileUserDAOProvider . |
LensKit uses Data Access Objects to obtain access to rating data. These objects allow LensKit to query for users, items, ratings, etc.
Many DAO operations are expected to be fast, usually with appropriate caching. It is typical
for DAOs to be instantiated once per Recommender
(and therefore
once per request in a web environment), and to cache aggressively in instance variables. More
sophisticated implementations using shared caches or services such as Memcache are certainly
feasible.
The streaming DAO implementations build up a cache once per instance. They aren't really suitable for anything besides recommender evaluation, typically.
The data access objects make no transactional or immutability guarantees, and does not provide mutation. An implementation is, of course, free to provide mutation.