org.opennms.netmgt.dao.hibernate
Class IpInterfaceDaoHibernate

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

public class IpInterfaceDaoHibernate
extends AbstractDaoHibernate<OnmsIpInterface,Integer>
implements IpInterfaceDao

IpInterfaceDaoHibernate class.

Version:
$Id: $
Author:
david

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
IpInterfaceDaoHibernate()
          Constructor for IpInterfaceDaoHibernate.
 
Method Summary
 boolean addressExistsWithForeignSource(String ipAddress, String foreignSource)
          addressExistsWithForeignSource
 OnmsIpInterface findByForeignKeyAndIpAddress(String foreignSource, String foreignId, String ipAddress)
          findByForeignKeyAndIpAddress
 Collection<OnmsIpInterface> findByIpAddress(String ipAddress)
          findByIpAddress
 OnmsIpInterface findByNodeIdAndIpAddress(Integer nodeId, String ipAddress)
          findByNodeIdAndIpAddress
 Collection<OnmsIpInterface> findByServiceType(String svcName)
          findByServiceType
 Collection<OnmsIpInterface> findHierarchyByServiceType(String svcName)
          findHierarchyByServiceType
 OnmsIpInterface get(OnmsNode node, String ipAddress)
          get
 Map<String,Integer> getInterfacesForNodes()
          getInterfacesForNodes
 
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

IpInterfaceDaoHibernate

public IpInterfaceDaoHibernate()

Constructor for IpInterfaceDaoHibernate.

Method Detail

get

public OnmsIpInterface get(OnmsNode node,
                           String ipAddress)

get

Specified by:
get in interface IpInterfaceDao
Parameters:
node - a OnmsNode object.
ipAddress - a String object.
Returns:
a OnmsIpInterface object.

findByIpAddress

public Collection<OnmsIpInterface> findByIpAddress(String ipAddress)

findByIpAddress

Specified by:
findByIpAddress in interface IpInterfaceDao
Parameters:
ipAddress - a String object.
Returns:
a Collection object.

findByNodeIdAndIpAddress

public OnmsIpInterface findByNodeIdAndIpAddress(Integer nodeId,
                                                String ipAddress)

findByNodeIdAndIpAddress

Specified by:
findByNodeIdAndIpAddress in interface IpInterfaceDao
Parameters:
nodeId - a Integer object.
ipAddress - a String object.
Returns:
a OnmsIpInterface object.

findByForeignKeyAndIpAddress

public OnmsIpInterface findByForeignKeyAndIpAddress(String foreignSource,
                                                    String foreignId,
                                                    String ipAddress)

findByForeignKeyAndIpAddress

Specified by:
findByForeignKeyAndIpAddress in interface IpInterfaceDao
Parameters:
foreignSource - a String object.
foreignId - a String object.
ipAddress - a String object.
Returns:
a OnmsIpInterface object.

findByServiceType

public Collection<OnmsIpInterface> findByServiceType(String svcName)

findByServiceType

Specified by:
findByServiceType in interface IpInterfaceDao
Parameters:
svcName - a String object.
Returns:
a Collection object.

findHierarchyByServiceType

public Collection<OnmsIpInterface> findHierarchyByServiceType(String svcName)

findHierarchyByServiceType

Specified by:
findHierarchyByServiceType in interface IpInterfaceDao
Parameters:
svcName - a String object.
Returns:
a Collection object.

getInterfacesForNodes

public Map<String,Integer> getInterfacesForNodes()

getInterfacesForNodes

Specified by:
getInterfacesForNodes in interface IpInterfaceDao
Returns:
a Map object.

addressExistsWithForeignSource

public boolean addressExistsWithForeignSource(String ipAddress,
                                              String foreignSource)

addressExistsWithForeignSource

Parameters:
ipAddress - a String object.
foreignSource - a String object.
Returns:
a boolean.


Copyright © 2011. All Rights Reserved.