org.opennms.netmgt.dao.hibernate
Class LocationMonitorDaoHibernate
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<OnmsLocationMonitor,Integer>
org.opennms.netmgt.dao.hibernate.LocationMonitorDaoHibernate
- All Implemented Interfaces:
- LocationMonitorDao, OnmsDao<OnmsLocationMonitor,Integer>, org.springframework.beans.factory.InitializingBean
public class LocationMonitorDaoHibernate
- extends AbstractDaoHibernate<OnmsLocationMonitor,Integer>
- implements LocationMonitorDao
- Author:
- David Hustace
| Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
| Methods inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate |
bulkDelete, clear, countAll, countMatching, delete, deleteAll, evict, find, find, findAll, findMatching, findMatchingObjects, findObjects, findUnique, findUnique, findUnique, flush, get, initialize, load, 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 org.springframework.dao.support.DaoSupport |
afterPropertiesSet, initDao |
| 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.OnmsDao |
clear, countAll, countMatching, delete, findAll, findMatching, flush, get, initialize, load, save, saveOrUpdate, update |
LocationMonitorDaoHibernate
public LocationMonitorDaoHibernate()
- Constructor that also initializes the required XML configurations
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
findAllMonitoringLocationDefinitions
public List<OnmsMonitoringLocationDefinition> findAllMonitoringLocationDefinitions()
- Specified by:
findAllMonitoringLocationDefinitions in interface LocationMonitorDao
saveMonitoringLocationDefinitions
public void saveMonitoringLocationDefinitions(Collection<OnmsMonitoringLocationDefinition> onmsDefs)
- Don't call this for now.
- Specified by:
saveMonitoringLocationDefinitions in interface LocationMonitorDao
saveMonitoringLocationDefinition
public void saveMonitoringLocationDefinition(OnmsMonitoringLocationDefinition onmsDef)
- Specified by:
saveMonitoringLocationDefinition in interface LocationMonitorDao
saveMonitoringConfig
protected void saveMonitoringConfig()
- Deprecated.
saveXml
protected void saveXml(String xml)
throws IOException
- Throws:
IOException
findAllLocationDefinitions
public Collection<OnmsMonitoringLocationDefinition> findAllLocationDefinitions()
getMonitoringLocationsConfiguration
public MonitoringLocationsConfiguration getMonitoringLocationsConfiguration()
setMonitoringLocationsConfiguration
public void setMonitoringLocationsConfiguration(MonitoringLocationsConfiguration monitoringLocationsConfiguration)
getMonitoringLocationConfigResource
public org.springframework.core.io.Resource getMonitoringLocationConfigResource()
setMonitoringLocationConfigResource
public void setMonitoringLocationConfigResource(org.springframework.core.io.Resource monitoringLocationResource)
findMonitoringLocationDefinition
public OnmsMonitoringLocationDefinition findMonitoringLocationDefinition(String monitoringLocationDefinitionName)
- Specified by:
findMonitoringLocationDefinition in interface LocationMonitorDao
getMostRecentStatusChange
public OnmsLocationSpecificStatus getMostRecentStatusChange(OnmsLocationMonitor locationMonitor,
OnmsMonitoredService monSvc)
- Specified by:
getMostRecentStatusChange in interface LocationMonitorDao
saveStatusChange
public void saveStatusChange(OnmsLocationSpecificStatus statusChange)
- Specified by:
saveStatusChange in interface LocationMonitorDao
findByLocationDefinition
public Collection<OnmsLocationMonitor> findByLocationDefinition(OnmsMonitoringLocationDefinition locationDefinition)
- Specified by:
findByLocationDefinition in interface LocationMonitorDao
getAllMostRecentStatusChanges
public Collection<OnmsLocationSpecificStatus> getAllMostRecentStatusChanges()
- Specified by:
getAllMostRecentStatusChanges in interface LocationMonitorDao
getAllStatusChangesAt
public Collection<OnmsLocationSpecificStatus> getAllStatusChangesAt(Date timestamp)
- Specified by:
getAllStatusChangesAt in interface LocationMonitorDao
getStatusChangesBetween
public Collection<OnmsLocationSpecificStatus> getStatusChangesBetween(Date startDate,
Date endDate)
- Description copied from interface:
LocationMonitorDao
- Returns all status changes since the date, and one previous
status change (so that status at the beginning of the period can be
determined).
- Specified by:
getStatusChangesBetween in interface LocationMonitorDao
findStatusChangesForNodeForUniqueMonitorAndInterface
public Collection<LocationMonitorIpInterface> findStatusChangesForNodeForUniqueMonitorAndInterface(int nodeId)
- Specified by:
findStatusChangesForNodeForUniqueMonitorAndInterface in interface LocationMonitorDao
Copyright © 2009. All Rights Reserved.