ibspan.tss.dao
Class HistoryDAO

java.lang.Object
  extended by ibspan.tss.dao.HistoryDAO

public class HistoryDAO
extends Object

Data Access Object providing nice interface to model with history.

Author:
Maciej Gawinecki

Constructor Summary
HistoryDAO(OntModel mHistoryDB)
          Construct HistoryDAO object providing interface to the given model with history.
 
Method Summary
 Event addEvent()
          Creates new event and adds it to History model.
 EventSession addSession(String sessionID, int userID)
          Creates new session with date of starting defined as "now".
 List<Event> getEvents(Date since)
          Returns events logged in History model since the given date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryDAO

public HistoryDAO(OntModel mHistoryDB)
           throws DAOException
Construct HistoryDAO object providing interface to the given model with history.

Parameters:
mHistoryDB - is a model with history
Throws:
DAOException
Method Detail

addEvent

public Event addEvent()
Creates new event and adds it to History model.

Returns:
newly created event with ID field set up.

addSession

public EventSession addSession(String sessionID,
                               int userID)
Creates new session with date of starting defined as "now".

Parameters:
sessionID - is ID of session to be created.
userID - is ID of user for which the given session is to be created.
Returns:
newly created session.

getEvents

public List<Event> getEvents(Date since)
Returns events logged in History model since the given date.

Parameters:
since - is a date from which all logged events will be returned
Returns:
a list of events.