| Modifier and Type | Method and Description |
|---|---|
EventWriter |
createEventWriter(EventWriterConfiguration config)
Create a custom event writer.
|
void |
createStorage(EventStorage storage,
boolean update)
Register a new event storage and create it if necessary.
|
void |
deleteEvent(java.lang.String context,
java.lang.String name,
long id)
Delete a single persistent event.
|
long |
deleteEvents(java.lang.String context)
Delete all persistent events occurred in a certain context.
|
long |
deleteEvents(java.lang.String context,
java.lang.String name,
java.util.Date startDate,
java.util.Date endDate)
Delete all persistent events occurred in a certain context.
|
void |
dropStorage(EventStorage storage)
Remove an event storage.
|
Event |
getEvent(Context context,
EventDefinition event,
long id)
Load a single event.
|
java.util.Iterator<Event> |
getEvents(ContextManager cm,
CallerController caller,
EntityList eventList,
EventsFilter filter,
java.util.Date startDate,
java.util.Date endDate,
java.lang.Integer maxResults,
java.lang.String sortBy,
boolean sortAscending,
java.lang.Object... additionalCriteria)
Load selected events from the storage.
|
DataTable |
getStatistics()
Returns usage statistics table.
|
long |
moveEvents(java.lang.String oldContext,
java.lang.String newContext)
Reassociate persistent events with a new context path.
|
void |
postEvent(EventDefinition ed,
Event event)
Persistently save a single event.
|
void |
postEvents(EventStorage storage,
EventDefinition ed,
java.util.List<Event> events)
Persistently save several events.
|
int |
removeExpiredEvents()
Causes event DAO to delete all expired events from all storages.
|
void |
updateEvent(Event event,
EventDefinition def)
Update a previously saved persistent event.
|
void createStorage(EventStorage storage, boolean update) throws DaoException
storage - A storage to registerupdate - Requests storage schema updateDaoException - If registration or creation has failedvoid dropStorage(EventStorage storage) throws DaoException
storage - A storage to removeDaoException - If removal has failedvoid postEvent(EventDefinition ed, Event event) throws DaoException
ed - A definition of the eventevent - An event to be saved persistentlyDaoException - If saving has failedvoid postEvents(EventStorage storage, EventDefinition ed, java.util.List<Event> events) throws DaoException
storage - A storage to save events toevents - List of events to be saved persistentlyDaoException - If saving has failedjava.util.Iterator<Event> getEvents(ContextManager cm, CallerController caller, EntityList eventList, EventsFilter filter, java.util.Date startDate, java.util.Date endDate, java.lang.Integer maxResults, java.lang.String sortBy, boolean sortAscending, java.lang.Object... additionalCriteria) throws DaoException
cm - Context manager of the context tree the events are defined incaller - Caller controller used for event filteringeventList - List of events to loadfilter - A filter to be applied to events after loadingstartDate - Only events that occurred after this date will be loadedendDate - Only events that occurred before this date will be loadedmaxResults - Maximum number of events to loadsortBy - Name of field that will be used to compare events while sortingsortAscending - True if events should be sorted in ascending order and false otherwiseadditionalCriteria - Additional storage-level filtering criteriaDaoException - If loading has failedint removeExpiredEvents()
throws DaoException
DaoException - If cleaning has failedEvent getEvent(Context context, EventDefinition event, long id) throws DaoException
context - Context the event has occurred inevent - Definition of the eventid - Unique ID of the eventDaoException - If loading has failedvoid deleteEvent(java.lang.String context,
java.lang.String name,
long id)
throws DaoException
context - Context the event has occurred inname - Name of the eventid - Unique ID of the eventDaoException - If removal has failedlong deleteEvents(java.lang.String context)
throws DaoException
context - Context the events has occurred inDaoException - If removal has failedlong deleteEvents(java.lang.String context,
java.lang.String name,
java.util.Date startDate,
java.util.Date endDate)
throws DaoException
context - Context the events has occurred inname - Name of the eventstartDate - Only events that occurred after this date will be loadedendDate - Only events that occurred before this date will be loadedDaoException - If removal has failedvoid updateEvent(Event event, EventDefinition def) throws DaoException
event - An updated instance of the eventdef - Definition of the eventDaoException - If updating has failedlong moveEvents(java.lang.String oldContext,
java.lang.String newContext)
throws DaoException
oldContext - Context path of the events to reassociatenewContext - Context path the events will be associated withDaoException - If reassociation has failedEventWriter createEventWriter(EventWriterConfiguration config) throws DaoException
config - Configuration of the writesDaoException - If writer creation has failedDataTable getStatistics()