Package org.opennms.netmgt.dao.mock
Class MockEventDao
- java.lang.Object
-
- org.opennms.netmgt.dao.mock.AbstractMockDao<OnmsEvent,Integer>
-
- org.opennms.netmgt.dao.mock.MockEventDao
-
- All Implemented Interfaces:
EventCountDao
,EventDao
,LegacyOnmsDao<OnmsEvent,Integer>
,OnmsDao<OnmsEvent,Integer>
,org.springframework.beans.factory.InitializingBean
public class MockEventDao extends AbstractMockDao<OnmsEvent,Integer> implements EventDao, EventCountDao
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.dao.mock.AbstractMockDao
AbstractMockDao.NullEventForwarder
-
-
Constructor Summary
Constructors Constructor Description MockEventDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
deletePreviousEventsForAlarm(Integer id, OnmsEvent e)
protected void
generateId(OnmsEvent event)
List<OnmsEvent>
getEventsAfterDate(List<String> ueiList, Date date)
Returns a list of events which have been created AFTER date and the uei of each event matches one uei entry of the ueiList.List<OnmsEvent>
getEventsForEventParameters(Map<String,String> eventParameters)
protected Integer
getId(OnmsEvent event)
Set<CountedObject<String>>
getUeiCounts(Integer limit)
-
Methods inherited from class org.opennms.netmgt.dao.mock.AbstractMockDao
afterPropertiesSet, clear, countAll, countMatching, countMatching, delete, delete, findAll, findMatching, findMatching, flush, get, getAlarmAssociationDao, getAlarmDao, getAssetRecordDao, getCategoryDao, getDistPollerDao, getEventDao, getIpInterfaceDao, getMonitoredServiceDao, getMonitoringLocationDao, getNodeDao, getServiceRegistry, getServiceTypeDao, getSnmpInterfaceDao, initialize, load, lock, save, saveOrUpdate, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.dao.api.LegacyOnmsDao
countMatching, findMatching
-
Methods inherited from interface org.opennms.netmgt.dao.api.OnmsDao
clear, countAll, countMatching, delete, delete, findAll, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
-
-
-
-
Method Detail
-
generateId
protected void generateId(OnmsEvent event)
- Specified by:
generateId
in classAbstractMockDao<OnmsEvent,Integer>
-
getId
protected Integer getId(OnmsEvent event)
- Specified by:
getId
in classAbstractMockDao<OnmsEvent,Integer>
-
deletePreviousEventsForAlarm
public int deletePreviousEventsForAlarm(Integer id, OnmsEvent e)
- Specified by:
deletePreviousEventsForAlarm
in interfaceEventDao
-
getEventsAfterDate
public List<OnmsEvent> getEventsAfterDate(List<String> ueiList, Date date)
Description copied from interface:EventDao
Returns a list of events which have been created AFTER date and the uei of each event matches one uei entry of the ueiList.- Specified by:
getEventsAfterDate
in interfaceEventDao
- Parameters:
ueiList
- list with uei'sdate
- the date after which all events are loaded.- Returns:
- a list of events which have been created AFTER date and the uei of each event matches one uei entry of the ueiList.
-
getUeiCounts
public Set<CountedObject<String>> getUeiCounts(Integer limit)
- Specified by:
getUeiCounts
in interfaceEventCountDao
-
-