Package org.opennms.netmgt.dao.mock
Class MockMonitoredServiceDao
- java.lang.Object
-
- org.opennms.netmgt.dao.mock.AbstractMockDao<OnmsMonitoredService,Integer>
-
- org.opennms.netmgt.dao.mock.MockMonitoredServiceDao
-
- All Implemented Interfaces:
LegacyOnmsDao<OnmsMonitoredService,Integer>
,MonitoredServiceDao
,OnmsDao<OnmsMonitoredService,Integer>
,org.springframework.beans.factory.InitializingBean
public class MockMonitoredServiceDao extends AbstractMockDao<OnmsMonitoredService,Integer> implements MonitoredServiceDao
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.dao.mock.AbstractMockDao
AbstractMockDao.NullEventForwarder
-
-
Constructor Summary
Constructors Constructor Description MockMonitoredServiceDao()
-
Method Summary
-
Methods inherited from class org.opennms.netmgt.dao.mock.AbstractMockDao
afterPropertiesSet, clear, countAll, countMatching, countMatching, delete, delete, findAll, findMatching, findMatching, get, getAlarmAssociationDao, getAlarmDao, getAssetRecordDao, getCategoryDao, getDistPollerDao, getEventDao, getIpInterfaceDao, getMonitoredServiceDao, getMonitoringLocationDao, getNodeDao, getServiceRegistry, getServiceTypeDao, getSnmpInterfaceDao, initialize, load, lock, saveOrUpdate
-
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, get, initialize, load, lock, saveOrUpdate
-
-
-
-
Method Detail
-
save
public Integer save(OnmsMonitoredService svc)
- Specified by:
save
in interfaceOnmsDao<OnmsMonitoredService,Integer>
- Overrides:
save
in classAbstractMockDao<OnmsMonitoredService,Integer>
-
update
public void update(OnmsMonitoredService svc)
- Specified by:
update
in interfaceOnmsDao<OnmsMonitoredService,Integer>
- Overrides:
update
in classAbstractMockDao<OnmsMonitoredService,Integer>
-
flush
public void flush()
- Specified by:
flush
in interfaceOnmsDao<OnmsMonitoredService,Integer>
- Overrides:
flush
in classAbstractMockDao<OnmsMonitoredService,Integer>
-
generateId
protected void generateId(OnmsMonitoredService svc)
- Specified by:
generateId
in classAbstractMockDao<OnmsMonitoredService,Integer>
-
getId
protected Integer getId(OnmsMonitoredService service)
- Specified by:
getId
in classAbstractMockDao<OnmsMonitoredService,Integer>
-
get
public OnmsMonitoredService get(Integer nodeId, InetAddress ipAddress, Integer serviceId)
Description copied from interface:MonitoredServiceDao
get
- Specified by:
get
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.ipAddress
- aInetAddress
object.serviceId
- aInteger
object.- Returns:
- a
OnmsMonitoredService
object.
-
get
public OnmsMonitoredService get(Integer nodeId, InetAddress ipAddr, Integer ifIndex, Integer serviceId)
Description copied from interface:MonitoredServiceDao
get
- Specified by:
get
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.ipAddr
- aInetAddress
object.ifIndex
- aInteger
object.serviceId
- aInteger
object.- Returns:
- a
OnmsMonitoredService
object.
-
get
public OnmsMonitoredService get(Integer nodeId, InetAddress ipAddress, String svcName)
Description copied from interface:MonitoredServiceDao
get
- Specified by:
get
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.ipAddress
- aString
object.svcName
- aString
object.- Returns:
- a
OnmsMonitoredService
object.
-
findByType
public List<OnmsMonitoredService> findByType(String typeName)
Description copied from interface:MonitoredServiceDao
findByType
- Specified by:
findByType
in interfaceMonitoredServiceDao
- Parameters:
typeName
- aString
object.- Returns:
- a
Collection
object.
-
findMatchingServices
public List<OnmsMonitoredService> findMatchingServices(ServiceSelector serviceSelector)
Description copied from interface:MonitoredServiceDao
findMatchingServices
- Specified by:
findMatchingServices
in interfaceMonitoredServiceDao
- Parameters:
serviceSelector
- aServiceSelector
object.- Returns:
- a
Collection
object.
-
findAllServices
public List<OnmsMonitoredService> findAllServices()
Description copied from interface:MonitoredServiceDao
findAllServices
Use HQL to get OnmsMonitoredService joined with IpInterface and Node No lazy initialization- Specified by:
findAllServices
in interfaceMonitoredServiceDao
- Returns:
- a
Collection
object.
-
findByApplication
public Set<OnmsMonitoredService> findByApplication(OnmsApplication application)
Description copied from interface:MonitoredServiceDao
findByApplication
- Specified by:
findByApplication
in interfaceMonitoredServiceDao
- Parameters:
application
- aOnmsApplication
object.- Returns:
- a
Collection
object.
-
getPrimaryService
public OnmsMonitoredService getPrimaryService(Integer nodeId, String svcName)
Description copied from interface:MonitoredServiceDao
getPrimaryService
- Specified by:
getPrimaryService
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.svcName
- aString
object.- Returns:
- a
OnmsMonitoredService
object.
-
findByNode
public List<OnmsMonitoredService> findByNode(int nodeId)
- Specified by:
findByNode
in interfaceMonitoredServiceDao
-
-