org.opennms.netmgt.dao.hibernate
Class AtInterfaceDaoHibernate

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<OnmsAtInterface,Integer>
              extended by org.opennms.netmgt.dao.hibernate.AtInterfaceDaoHibernate
All Implemented Interfaces:
AtInterfaceDao, OnmsDao<OnmsAtInterface,Integer>, org.springframework.beans.factory.InitializingBean

public class AtInterfaceDaoHibernate
extends AbstractDaoHibernate<OnmsAtInterface,Integer>
implements AtInterfaceDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
AtInterfaceDaoHibernate()
           
 
Method Summary
 void deactivateForNodeIdIfOlderThan(int nodeid, Timestamp scanTime)
           
 Collection<OnmsAtInterface> findByMacAddress(String macAddress)
           
 OnmsAtInterface findByNodeAndAddress(Integer nodeId, InetAddress ipAddress, String macAddress)
           
 OnmsAtInterface getAtInterfaceForAddress(Connection dbConn, InetAddress address)
          Get the OnmsAtInterface that goes with a given address and node.
 void markDeletedIfNodeDeleted()
           
 void saveAtInterface(Connection dbConn, OnmsAtInterface saveMe)
           
 void setStatusForNode(Integer nodeid, Character action)
           
 void setStatusForNodeAndIfIndex(Integer nodeid, Integer ifIndex, Character action)
           
 void setStatusForNodeAndIp(Integer nodeid, String ipAddr, Character action)
           
 
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, 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 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, lock, save, saveOrUpdate, update
 

Constructor Detail

AtInterfaceDaoHibernate

public AtInterfaceDaoHibernate()
Method Detail

markDeletedIfNodeDeleted

public void markDeletedIfNodeDeleted()
Specified by:
markDeletedIfNodeDeleted in interface AtInterfaceDao

deactivateForNodeIdIfOlderThan

public void deactivateForNodeIdIfOlderThan(int nodeid,
                                           Timestamp scanTime)
Specified by:
deactivateForNodeIdIfOlderThan in interface AtInterfaceDao

findByMacAddress

public Collection<OnmsAtInterface> findByMacAddress(String macAddress)
Specified by:
findByMacAddress in interface AtInterfaceDao

setStatusForNode

public void setStatusForNode(Integer nodeid,
                             Character action)
Specified by:
setStatusForNode in interface AtInterfaceDao

setStatusForNodeAndIp

public void setStatusForNodeAndIp(Integer nodeid,
                                  String ipAddr,
                                  Character action)
Specified by:
setStatusForNodeAndIp in interface AtInterfaceDao

setStatusForNodeAndIfIndex

public void setStatusForNodeAndIfIndex(Integer nodeid,
                                       Integer ifIndex,
                                       Character action)
Specified by:
setStatusForNodeAndIfIndex in interface AtInterfaceDao

findByNodeAndAddress

public OnmsAtInterface findByNodeAndAddress(Integer nodeId,
                                            InetAddress ipAddress,
                                            String macAddress)
Specified by:
findByNodeAndAddress in interface AtInterfaceDao

saveAtInterface

public void saveAtInterface(Connection dbConn,
                            OnmsAtInterface saveMe)
Specified by:
saveAtInterface in interface AtInterfaceDao

getAtInterfaceForAddress

public OnmsAtInterface getAtInterfaceForAddress(Connection dbConn,
                                                InetAddress address)
Description copied from interface: AtInterfaceDao
Get the OnmsAtInterface that goes with a given address and node. If it does not exist, but the IP interface does exist, then create it. If an equivalent IP interface does *not* exist, returns null.

Specified by:
getAtInterfaceForAddress in interface AtInterfaceDao
Parameters:
dbConn - the database connection, if necessary
Returns:
an OnmsAtInterface


Copyright © 2011. All Rights Reserved.