Package org.opennms.netmgt.dao.hibernate
Class ApplicationDaoHibernate
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate3.support.HibernateDaoSupport
-
- org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<OnmsApplication,java.lang.Integer>
-
- org.opennms.netmgt.dao.hibernate.ApplicationDaoHibernate
-
- All Implemented Interfaces:
ApplicationDao
,OnmsDao<OnmsApplication,java.lang.Integer>
,org.springframework.beans.factory.InitializingBean
public class ApplicationDaoHibernate extends AbstractDaoHibernate<OnmsApplication,java.lang.Integer> implements ApplicationDao
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
m_criteriaConverter
-
-
Constructor Summary
Constructors Constructor Description ApplicationDaoHibernate()
Constructor for ApplicationDaoHibernate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OnmsApplication
findByName(java.lang.String name)
findByNamejava.util.List<MonitoredServiceStatusEntity>
getAlarmStatus()
Load all alarms from the alarm table which have a node id, ip address and service type set.java.util.List<MonitoredServiceStatusEntity>
getAlarmStatus(java.util.List<OnmsApplication> applications)
java.util.List<ApplicationStatus>
getApplicationStatus()
Determine the application's status.java.util.List<ApplicationStatus>
getApplicationStatus(java.util.List<OnmsApplication> applications)
same asApplicationDao.getApplicationStatus()
but only calculates the status for the given applications.java.util.List<OnmsMonitoringLocation>
getPerspectiveLocationsForService(int nodeId, java.net.InetAddress ipAddress, java.lang.String serviceName)
java.util.List<ServicePerspective>
getServicePerspectives()
-
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.OnmsDao
clear, countAll, countMatching, delete, delete, findAll, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
-
-
-
-
Method Detail
-
findByName
public OnmsApplication findByName(java.lang.String name)
findByName
- Specified by:
findByName
in interfaceApplicationDao
- Parameters:
name
- aString
object.- Returns:
- a
OnmsApplication
object.
-
getApplicationStatus
public java.util.List<ApplicationStatus> getApplicationStatus()
Description copied from interface:ApplicationDao
Determine the application's status. As applications do not have a direct status attached, the status is calculated based on the nodeDown, interfaceDown or serviceLost events/alarms from the application's monitored services.- Specified by:
getApplicationStatus
in interfaceApplicationDao
- Returns:
- the application's status.
-
getApplicationStatus
public java.util.List<ApplicationStatus> getApplicationStatus(java.util.List<OnmsApplication> applications)
Description copied from interface:ApplicationDao
same asApplicationDao.getApplicationStatus()
but only calculates the status for the given applications.- Specified by:
getApplicationStatus
in interfaceApplicationDao
- Parameters:
applications
- The applications to calculate the status for.- Returns:
- The application's status.
-
getAlarmStatus
public java.util.List<MonitoredServiceStatusEntity> getAlarmStatus()
Description copied from interface:ApplicationDao
Load all alarms from the alarm table which have a node id, ip address and service type set.- Specified by:
getAlarmStatus
in interfaceApplicationDao
- Returns:
- all alarms from the alarm table which have a node id, ip address and service type set.
-
getAlarmStatus
public java.util.List<MonitoredServiceStatusEntity> getAlarmStatus(java.util.List<OnmsApplication> applications)
- Specified by:
getAlarmStatus
in interfaceApplicationDao
-
getPerspectiveLocationsForService
public java.util.List<OnmsMonitoringLocation> getPerspectiveLocationsForService(int nodeId, java.net.InetAddress ipAddress, java.lang.String serviceName)
- Specified by:
getPerspectiveLocationsForService
in interfaceApplicationDao
-
getServicePerspectives
public java.util.List<ServicePerspective> getServicePerspectives()
- Specified by:
getServicePerspectives
in interfaceApplicationDao
-
-