Package org.opennms.netmgt.dao.api
Interface OutageDao
-
- All Superinterfaces:
LegacyOnmsDao<OnmsOutage,Integer>
,OnmsDao<OnmsOutage,Integer>
- All Known Implementing Classes:
MockOutageDao
,OutageDaoHibernate
public interface OutageDao extends LegacyOnmsDao<OnmsOutage,Integer>
OutageDao interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
countOutagesByNode()
Get the number of nodes with outages.Integer
currentOutageCount()
currentOutageCountOnmsOutage
currentOutageForService(OnmsMonitoredService service)
Return the current open outage for the service or if the service is up and has no open outage, return null.OnmsOutage
currentOutageForServiceFromPerspective(OnmsMonitoredService service, OnmsMonitoringLocation perspective)
Collection<OnmsOutage>
currentOutages()
currentOutagesCollection<OnmsOutage>
currentOutagesForServiceFromPerspectivePoller(OnmsMonitoredService service)
Return all current open outages for the given service be it detected from Perspective Poller.Collection<OnmsOutage>
findAll(Integer offset, Integer limit)
findAllList<HeatMapElement>
getHeatMapItemsForEntity(String entityNameColumn, String entityIdColumn, String restrictionColumn, String restrictionValue, String... groupByColumns)
Retrieves heatmap elements for a given combination of database columns.List<OutageSummary>
getNodeOutageSummaries(int rows)
Get the list of current outages, one per node.Collection<OnmsOutage>
getStatusChangesForApplicationIdBetween(Date startDate, Date endDate, Integer applicationId)
Collection<OnmsOutage>
matchingCurrentOutages(ServiceSelector selector)
Finds all current (unresolved) outages that match the given service selector.Collection<CurrentOutageDetails>
newestCurrentOutages(List<String> services)
Finds the latest (unresolved) outages that match the given services.-
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
-
currentOutages
Collection<OnmsOutage> currentOutages()
currentOutages
- Returns:
- a
Collection
object.
-
currentOutageForService
OnmsOutage currentOutageForService(OnmsMonitoredService service)
Return the current open outage for the service or if the service is up and has no open outage, return null.
-
currentOutageForServiceFromPerspective
OnmsOutage currentOutageForServiceFromPerspective(OnmsMonitoredService service, OnmsMonitoringLocation perspective)
-
currentOutagesForServiceFromPerspectivePoller
Collection<OnmsOutage> currentOutagesForServiceFromPerspectivePoller(OnmsMonitoredService service)
Return all current open outages for the given service be it detected from Perspective Poller.
-
newestCurrentOutages
Collection<CurrentOutageDetails> newestCurrentOutages(List<String> services)
Finds the latest (unresolved) outages that match the given services.- Parameters:
services
- a list of services- Returns:
- a
Collection
of outages
-
matchingCurrentOutages
Collection<OnmsOutage> matchingCurrentOutages(ServiceSelector selector)
Finds all current (unresolved) outages that match the given service selector.- Parameters:
selector
- a service selector (filter + service list)- Returns:
- a
Collection
of outages
-
findAll
Collection<OnmsOutage> findAll(Integer offset, Integer limit)
findAll
- Parameters:
offset
- aInteger
object.limit
- aInteger
object.- Returns:
- a
Collection
object.
-
countOutagesByNode
int countOutagesByNode()
Get the number of nodes with outages.- Returns:
- the number of nodes with outages.
-
getNodeOutageSummaries
List<OutageSummary> getNodeOutageSummaries(int rows)
Get the list of current outages, one per node. If a node has more than one outage, the oldest outstanding outage is returned.- Parameters:
rows
- The maximum number of outages to return.- Returns:
- A list of outages.
-
getHeatMapItemsForEntity
List<HeatMapElement> getHeatMapItemsForEntity(String entityNameColumn, String entityIdColumn, String restrictionColumn, String restrictionValue, String... groupByColumns)
Retrieves heatmap elements for a given combination of database columns.- Parameters:
entityNameColumn
- the entity's name columnentityIdColumn
- the entity's id columnrestrictionColumn
- a column used for a restriction of the resultsrestrictionValue
- the value that must match against the restrictionColumngroupByColumns
- columns used for the SQL group-by clause- Returns:
- the heatmap elements for this query
-
getStatusChangesForApplicationIdBetween
Collection<OnmsOutage> getStatusChangesForApplicationIdBetween(Date startDate, Date endDate, Integer applicationId)
-
-