org.activemath.learner.history
Interface LearnerHistory

All Known Implementing Classes:
LearnerHistoryImpl, NopHistory

public interface LearnerHistory

This is an Interface that decouples the actual history implementation from the usage in the webapp.


Method Summary
 boolean alreadySeen(String learnerId, String itemId)
          returns true if an ItemPresentedEvent for the item with the given itemId can ba found, false otherwise.
 ActivemathEvent fetchEvent(long id)
          returns the event stored in the history with the given id, or null if no such event exists
 List<ActivemathEvent> getHistoryEntries(HistoryQuery query)
          Should return a List of ActivemathEvents that match the supplied query.
 List<ActivemathEvent> getHistoryEntries(HistoryQuery query, int firstResult, int maxResults)
           
 int getNumResults(HistoryQuery query)
           
 

Method Detail

fetchEvent

ActivemathEvent fetchEvent(long id)
returns the event stored in the history with the given id, or null if no such event exists

Parameters:
id - The id of the event to fetch
Returns:
The event with the given id or null if there is no such event.

alreadySeen

boolean alreadySeen(String learnerId,
                    String itemId)
returns true if an ItemPresentedEvent for the item with the given itemId can ba found, false otherwise.


getHistoryEntries

List<ActivemathEvent> getHistoryEntries(HistoryQuery query)
Should return a List of ActivemathEvents that match the supplied query.

Parameters:
query - The query that is to be made against the database
Returns:
A List of ActivemathEvents that match the given query

getHistoryEntries

List<ActivemathEvent> getHistoryEntries(HistoryQuery query,
                                        int firstResult,
                                        int maxResults)

getNumResults

int getNumResults(HistoryQuery query)