|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<OnmsLocationMonitor,Integer>
org.opennms.netmgt.dao.hibernate.LocationMonitorDaoHibernate
public class LocationMonitorDaoHibernate
LocationMonitorDaoHibernate class.
| Field Summary |
|---|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
LocationMonitorDaoHibernate()
Constructor that also initializes the required XML configurations |
|
| Method Summary | |
|---|---|
Collection<OnmsMonitoringLocationDefinition> |
findAllLocationDefinitions()
findAllLocationDefinitions |
List<OnmsMonitoringLocationDefinition> |
findAllMonitoringLocationDefinitions()
findAllMonitoringLocationDefinitions |
Collection<OnmsLocationMonitor> |
findByApplication(OnmsApplication application)
findByApplication |
Collection<OnmsLocationMonitor> |
findByLocationDefinition(OnmsMonitoringLocationDefinition locationDefinition)
findByLocationDefinition |
OnmsMonitoringLocationDefinition |
findMonitoringLocationDefinition(String monitoringLocationDefinitionName)
findMonitoringLocationDefinition |
Collection<LocationMonitorIpInterface> |
findStatusChangesForNodeForUniqueMonitorAndInterface(int nodeId)
findStatusChangesForNodeForUniqueMonitorAndInterface |
Collection<OnmsLocationSpecificStatus> |
getAllMostRecentStatusChanges()
getAllMostRecentStatusChanges |
Collection<OnmsLocationSpecificStatus> |
getAllStatusChangesAt(Date timestamp)
getAllStatusChangesAt |
org.springframework.core.io.Resource |
getMonitoringLocationConfigResource()
getMonitoringLocationConfigResource |
OnmsLocationSpecificStatus |
getMostRecentStatusChange(OnmsLocationMonitor locationMonitor,
OnmsMonitoredService monSvc)
getMostRecentStatusChange |
Collection<OnmsLocationSpecificStatus> |
getMostRecentStatusChangesForLocation(String locationName)
getMostRecentStatusChangesForLocation |
Collection<OnmsLocationSpecificStatus> |
getStatusChangesBetween(Date startDate,
Date endDate)
Returns all status changes since the date, and one previous status change (so that status at the beginning of the period can be determined). |
Collection<OnmsLocationSpecificStatus> |
getStatusChangesForApplicationBetween(Date startDate,
Date endDate,
String applicationName)
getStatusChangesForApplicationBetween |
Collection<OnmsLocationSpecificStatus> |
getStatusChangesForLocationBetween(Date startDate,
Date endDate,
String locationName)
getStatusChangesForLocationBetween |
protected void |
initDao()
|
void |
pauseAll()
Mark all location monitors as paused except those that are already stopped |
void |
resumeAll()
Mark all paused location monitors as started |
protected void |
saveMonitoringConfig()
saveMonitoringConfig |
void |
saveMonitoringLocationDefinition(OnmsMonitoringLocationDefinition onmsDef)
saveMonitoringLocationDefinition |
void |
saveMonitoringLocationDefinitions(Collection<OnmsMonitoringLocationDefinition> onmsDefs)
saveMonitoringLocationDefinitions |
void |
saveStatusChange(OnmsLocationSpecificStatus statusChange)
saveStatusChange |
protected void |
saveXml(String xml)
saveXml |
void |
setMonitoringLocationConfigResource(org.springframework.core.io.Resource monitoringLocationResource)
setMonitoringLocationConfigResource |
| 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 |
| 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 |
| Constructor Detail |
|---|
public LocationMonitorDaoHibernate()
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.| Method Detail |
|---|
protected void initDao()
throws Exception
initDao in class org.springframework.dao.support.DaoSupportExceptionpublic List<OnmsMonitoringLocationDefinition> findAllMonitoringLocationDefinitions()
findAllMonitoringLocationDefinitions
findAllMonitoringLocationDefinitions in interface LocationMonitorDaoList object.public void saveMonitoringLocationDefinitions(Collection<OnmsMonitoringLocationDefinition> onmsDefs)
saveMonitoringLocationDefinitions
Don't call this for now.
saveMonitoringLocationDefinitions in interface LocationMonitorDaoonmsDefs - a Collection object.public void saveMonitoringLocationDefinition(OnmsMonitoringLocationDefinition onmsDef)
saveMonitoringLocationDefinition
saveMonitoringLocationDefinition in interface LocationMonitorDaoonmsDef - a OnmsMonitoringLocationDefinition object.protected void saveMonitoringConfig()
saveMonitoringConfig
protected void saveXml(String xml)
throws IOException
saveXml
xml - a String object.
IOException - if any.public Collection<OnmsMonitoringLocationDefinition> findAllLocationDefinitions()
findAllLocationDefinitions
Collection object.public org.springframework.core.io.Resource getMonitoringLocationConfigResource()
getMonitoringLocationConfigResource
Resource object.public void setMonitoringLocationConfigResource(org.springframework.core.io.Resource monitoringLocationResource)
setMonitoringLocationConfigResource
monitoringLocationResource - a Resource object.public OnmsMonitoringLocationDefinition findMonitoringLocationDefinition(String monitoringLocationDefinitionName)
findMonitoringLocationDefinition
findMonitoringLocationDefinition in interface LocationMonitorDaomonitoringLocationDefinitionName - a String object.
OnmsMonitoringLocationDefinition object.
public OnmsLocationSpecificStatus getMostRecentStatusChange(OnmsLocationMonitor locationMonitor,
OnmsMonitoredService monSvc)
getMostRecentStatusChange
getMostRecentStatusChange in interface LocationMonitorDaolocationMonitor - a OnmsLocationMonitor object.monSvc - a OnmsMonitoredService object.
OnmsLocationSpecificStatus object.public void saveStatusChange(OnmsLocationSpecificStatus statusChange)
saveStatusChange
saveStatusChange in interface LocationMonitorDaostatusChange - a OnmsLocationSpecificStatus object.public Collection<OnmsLocationMonitor> findByApplication(OnmsApplication application)
findByApplication
Returns the location monitors which have reported on services belonging to the provided application
findByApplication in interface LocationMonitorDaoapplication - a OnmsApplication object.
Collection object.public Collection<OnmsLocationMonitor> findByLocationDefinition(OnmsMonitoringLocationDefinition locationDefinition)
findByLocationDefinition
findByLocationDefinition in interface LocationMonitorDaolocationDefinition - a OnmsMonitoringLocationDefinition object.
Collection object.public Collection<OnmsLocationSpecificStatus> getAllMostRecentStatusChanges()
getAllMostRecentStatusChanges
getAllMostRecentStatusChanges in interface LocationMonitorDaoCollection object.public Collection<OnmsLocationSpecificStatus> getAllStatusChangesAt(Date timestamp)
getAllStatusChangesAt
getAllStatusChangesAt in interface LocationMonitorDaotimestamp - a Date object.
Collection object.
public Collection<OnmsLocationSpecificStatus> getStatusChangesBetween(Date startDate,
Date endDate)
getStatusChangesBetween in interface LocationMonitorDaostartDate - a Date object.endDate - a Date object.
Collection object.
public Collection<OnmsLocationSpecificStatus> getStatusChangesForLocationBetween(Date startDate,
Date endDate,
String locationName)
getStatusChangesForLocationBetween
getStatusChangesForLocationBetween in interface LocationMonitorDaostartDate - a Date object.endDate - a Date object.locationName - a String object.
Collection object.
public Collection<OnmsLocationSpecificStatus> getStatusChangesForApplicationBetween(Date startDate,
Date endDate,
String applicationName)
getStatusChangesForApplicationBetween
getStatusChangesForApplicationBetween in interface LocationMonitorDaostartDate - a Date object.endDate - a Date object.applicationName - a String object.
Collection object.public Collection<OnmsLocationSpecificStatus> getMostRecentStatusChangesForLocation(String locationName)
getMostRecentStatusChangesForLocation
getMostRecentStatusChangesForLocation in interface LocationMonitorDaolocationName - a String object.
Collection object.public Collection<LocationMonitorIpInterface> findStatusChangesForNodeForUniqueMonitorAndInterface(int nodeId)
findStatusChangesForNodeForUniqueMonitorAndInterface
findStatusChangesForNodeForUniqueMonitorAndInterface in interface LocationMonitorDaonodeId - a int.
Collection object.public void pauseAll()
pauseAll in interface LocationMonitorDaopublic void resumeAll()
resumeAll in interface LocationMonitorDao
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||