Package org.opennms.netmgt.dao.hibernate
Class MonitoredServiceDaoHibernate
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate3.support.HibernateDaoSupport
-
- org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<OnmsMonitoredService,java.lang.Integer>
-
- org.opennms.netmgt.dao.hibernate.MonitoredServiceDaoHibernate
-
- All Implemented Interfaces:
LegacyOnmsDao<OnmsMonitoredService,java.lang.Integer>
,MonitoredServiceDao
,OnmsDao<OnmsMonitoredService,java.lang.Integer>
,org.springframework.beans.factory.InitializingBean
public class MonitoredServiceDaoHibernate extends AbstractDaoHibernate<OnmsMonitoredService,java.lang.Integer> implements MonitoredServiceDao
MonitoredServiceDaoHibernate class.
- Author:
- david
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
m_criteriaConverter
-
-
Constructor Summary
Constructors Constructor Description MonitoredServiceDaoHibernate()
Constructor for MonitoredServiceDaoHibernate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<OnmsMonitoredService>
findAllServices()
findAllServicesjava.util.Set<OnmsMonitoredService>
findByApplication(OnmsApplication application)
findByApplicationjava.util.List<OnmsMonitoredService>
findByNode(int nodeId)
java.util.List<OnmsMonitoredService>
findByType(java.lang.String type)
findByTypejava.util.List<OnmsMonitoredService>
findMatchingServices(ServiceSelector selector)
findMatchingServicesOnmsMonitoredService
get(java.lang.Integer nodeId, java.net.InetAddress ipAddress, java.lang.Integer serviceId)
getOnmsMonitoredService
get(java.lang.Integer nodeId, java.net.InetAddress ipAddr, java.lang.Integer ifIndex, java.lang.Integer serviceId)
getOnmsMonitoredService
get(java.lang.Integer nodeId, java.net.InetAddress ipAddress, java.lang.String svcName)
getOnmsMonitoredService
getPrimaryService(java.lang.Integer nodeId, java.lang.String svcName)
getPrimaryService-
Methods inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
buildHibernateCallback, bulkDelete, clear, countAll, countMatching, countMatching, delete, delete, deleteAll, find, find, findAll, findMatching, findMatching, findObjects, findUnique, flush, get, initDao, initialize, load, lock, merge, queryInt, queryInt, save, saveOrUpdate, update
-
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
-
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
-
findByType
public java.util.List<OnmsMonitoredService> findByType(java.lang.String type)
findByType
- Specified by:
findByType
in interfaceMonitoredServiceDao
- Parameters:
type
- aString
object.- Returns:
- a
Collection
object.
-
get
public OnmsMonitoredService get(java.lang.Integer nodeId, java.net.InetAddress ipAddress, java.lang.String svcName)
get
- Specified by:
get
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.ipAddress
- aString
object.svcName
- aString
object.- Returns:
- a
OnmsMonitoredService
object.
-
get
public OnmsMonitoredService get(java.lang.Integer nodeId, java.net.InetAddress ipAddress, java.lang.Integer serviceId)
get
- Specified by:
get
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.ipAddress
- aInetAddress
object.serviceId
- aInteger
object.- Returns:
- a
OnmsMonitoredService
object.
-
getPrimaryService
public OnmsMonitoredService getPrimaryService(java.lang.Integer nodeId, java.lang.String svcName)
getPrimaryService
- Specified by:
getPrimaryService
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.svcName
- aString
object.- Returns:
- a
OnmsMonitoredService
object.
-
get
public OnmsMonitoredService get(java.lang.Integer nodeId, java.net.InetAddress ipAddr, java.lang.Integer ifIndex, java.lang.Integer serviceId)
get
- Specified by:
get
in interfaceMonitoredServiceDao
- Parameters:
nodeId
- aInteger
object.ipAddr
- aInetAddress
object.ifIndex
- aInteger
object.serviceId
- aInteger
object.- Returns:
- a
OnmsMonitoredService
object.
-
findMatchingServices
public java.util.List<OnmsMonitoredService> findMatchingServices(ServiceSelector selector)
findMatchingServices
- Specified by:
findMatchingServices
in interfaceMonitoredServiceDao
- Parameters:
selector
- aServiceSelector
object.- Returns:
- a
Collection
object.
-
findByApplication
public java.util.Set<OnmsMonitoredService> findByApplication(OnmsApplication application)
findByApplication
- Specified by:
findByApplication
in interfaceMonitoredServiceDao
- Parameters:
application
- aOnmsApplication
object.- Returns:
- a
Collection
object.
-
findAllServices
public java.util.List<OnmsMonitoredService> findAllServices()
findAllServices
Use HQL to get OnmsMonitoredService joined with IpInterface and Node No lazy initialization- Specified by:
findAllServices
in interfaceMonitoredServiceDao
- Returns:
- a
Collection
object.
-
findByNode
public java.util.List<OnmsMonitoredService> findByNode(int nodeId)
- Specified by:
findByNode
in interfaceMonitoredServiceDao
-
-