org.opennms.netmgt.dao.hibernate
Class OutageDaoHibernate

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<OnmsOutage,Integer>
              extended by org.opennms.netmgt.dao.hibernate.OutageDaoHibernate
All Implemented Interfaces:
OnmsDao<OnmsOutage,Integer>, OutageDao, org.springframework.beans.factory.InitializingBean

public class OutageDaoHibernate
extends AbstractDaoHibernate<OnmsOutage,Integer>
implements OutageDao

OutageDaoHibernate class.

Version:
$Id: $
Author:
ranger

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
OutageDaoHibernate()
          Constructor for OutageDaoHibernate.
 
Method Summary
 int countOutagesByNode()
          Get the number of nodes with outages.
 Integer currentOutageCount()
          currentOutageCount
 Collection<OnmsOutage> currentOutages()
          currentOutages
 Collection<OnmsOutage> findAll(Integer offset, Integer limit)
          findAll
 List<OutageSummary> getNodeOutageSummaries(int rows)
          Get the list of current outages, one per node.
 Collection<OnmsOutage> matchingCurrentOutages(ServiceSelector selector)
          matchingCurrentOutages
 
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
 

Constructor Detail

OutageDaoHibernate

public OutageDaoHibernate()

Constructor for OutageDaoHibernate.

Method Detail

currentOutageCount

public Integer currentOutageCount()

currentOutageCount

Specified by:
currentOutageCount in interface OutageDao
Returns:
a Integer object.

currentOutages

public Collection<OnmsOutage> currentOutages()

currentOutages

Specified by:
currentOutages in interface OutageDao
Returns:
a Collection object.

findAll

public Collection<OnmsOutage> findAll(Integer offset,
                                      Integer limit)

findAll

Specified by:
findAll in interface OutageDao
Parameters:
offset - a Integer object.
limit - a Integer object.
Returns:
a Collection object.

matchingCurrentOutages

public Collection<OnmsOutage> matchingCurrentOutages(ServiceSelector selector)

matchingCurrentOutages

Specified by:
matchingCurrentOutages in interface OutageDao
Parameters:
selector - a ServiceSelector object.
Returns:
a Collection object.

countOutagesByNode

public int countOutagesByNode()
Get the number of nodes with outages.

Specified by:
countOutagesByNode in interface OutageDao
Returns:
the number of nodes with outages.

getNodeOutageSummaries

public 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.

Specified by:
getNodeOutageSummaries in interface OutageDao
Parameters:
rows - The maximum number of outages to return.
Returns:
A list of outages.


Copyright © 2011. All Rights Reserved.