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,Integer>
-
- org.opennms.netmgt.dao.hibernate.ApplicationDaoHibernate
-
- All Implemented Interfaces:
ApplicationDao
,OnmsDao<OnmsApplication,Integer>
,org.springframework.beans.factory.InitializingBean
public class ApplicationDaoHibernate extends AbstractDaoHibernate<OnmsApplication,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(String name)
findByNameList<MonitoredServiceStatusEntity>
getAlarmStatus()
Load all alarms from the alarm table which have a node id, ip address and service type set.List<MonitoredServiceStatusEntity>
getAlarmStatus(List<OnmsApplication> applications)
List<ApplicationStatus>
getApplicationStatus()
Determine the application's status.List<ApplicationStatus>
getApplicationStatus(List<OnmsApplication> applications)
same asApplicationDao.getApplicationStatus()
but only calculates the status for the given applications.List<OnmsMonitoringLocation>
getPerspectiveLocationsForService(int nodeId, InetAddress ipAddress, String serviceName)
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(String name)
findByName
- Specified by:
findByName
in interfaceApplicationDao
- Parameters:
name
- aString
object.- Returns:
- a
OnmsApplication
object.
-
getApplicationStatus
public 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 List<ApplicationStatus> getApplicationStatus(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 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 List<MonitoredServiceStatusEntity> getAlarmStatus(List<OnmsApplication> applications)
- Specified by:
getAlarmStatus
in interfaceApplicationDao
-
getPerspectiveLocationsForService
public List<OnmsMonitoringLocation> getPerspectiveLocationsForService(int nodeId, InetAddress ipAddress, String serviceName)
- Specified by:
getPerspectiveLocationsForService
in interfaceApplicationDao
-
getServicePerspectives
public List<ServicePerspective> getServicePerspectives()
- Specified by:
getServicePerspectives
in interfaceApplicationDao
-
-