Package org.opennms.netmgt.dao.hibernate
Class IpInterfaceDaoHibernate
- java.lang.Object
-
- org.springframework.dao.support.DaoSupport
-
- org.springframework.orm.hibernate3.support.HibernateDaoSupport
-
- org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate<OnmsIpInterface,java.lang.Integer>
-
- org.opennms.netmgt.dao.hibernate.IpInterfaceDaoHibernate
-
- All Implemented Interfaces:
IpInterfaceDao
,LegacyOnmsDao<OnmsIpInterface,java.lang.Integer>
,OnmsDao<OnmsIpInterface,java.lang.Integer>
,org.springframework.beans.factory.InitializingBean
public class IpInterfaceDaoHibernate extends AbstractDaoHibernate<OnmsIpInterface,java.lang.Integer> implements IpInterfaceDao
IpInterfaceDaoHibernate class.
- Author:
- david
-
-
Field Summary
-
Fields inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
m_criteriaConverter
-
-
Constructor Summary
Constructors Constructor Description IpInterfaceDaoHibernate()
Constructor for IpInterfaceDaoHibernate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addressExistsWithForeignSource(java.lang.String ipAddress, java.lang.String foreignSource)
addressExistsWithForeignSourceOnmsIpInterface
findByForeignKeyAndIpAddress(java.lang.String foreignSource, java.lang.String foreignId, java.lang.String ipAddress)
findByForeignKeyAndIpAddressjava.util.List<OnmsIpInterface>
findByIpAddress(java.lang.String ipAddress)
findByIpAddressjava.util.List<OnmsIpInterface>
findByNodeId(java.lang.Integer nodeId)
findByNodeIdOnmsIpInterface
findByNodeIdAndIpAddress(java.lang.Integer nodeId, java.lang.String ipAddress)
findByNodeIdAndIpAddressjava.util.List<OnmsIpInterface>
findByServiceType(java.lang.String svcName)
findByServiceTypejava.util.List<OnmsIpInterface>
findHierarchyByServiceType(java.lang.String svcName)
findHierarchyByServiceTypejava.util.List<OnmsIpInterface>
findInterfacesWithMetadata(java.lang.String context, java.lang.String key, java.lang.String value)
OnmsIpInterface
findPrimaryInterfaceByNodeId(java.lang.Integer nodeId)
This function should be kept similar toOnmsNode.getPrimaryInterface()
.OnmsIpInterface
get(OnmsNode node, java.lang.String ipAddress)
getjava.util.Map<java.net.InetAddress,java.lang.Integer>
getInterfacesForNodes()
TODO: This function should filter out deleted interfaces-
Methods inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
buildHibernateCallback, bulkDelete, clear, countAll, countMatching, countMatching, delete, delete, deleteAll, find, find, findAll, findMatching, findMatching, findObjects, 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
get
public OnmsIpInterface get(OnmsNode node, java.lang.String ipAddress)
get
- Specified by:
get
in interfaceIpInterfaceDao
- Parameters:
node
- aOnmsNode
object.ipAddress
- aString
object.- Returns:
- a
OnmsIpInterface
object.
-
findByIpAddress
public java.util.List<OnmsIpInterface> findByIpAddress(java.lang.String ipAddress)
findByIpAddress
- Specified by:
findByIpAddress
in interfaceIpInterfaceDao
- Parameters:
ipAddress
- aString
object.- Returns:
- a
Collection
object.
-
findByNodeId
public java.util.List<OnmsIpInterface> findByNodeId(java.lang.Integer nodeId)
findByNodeId
- Specified by:
findByNodeId
in interfaceIpInterfaceDao
- Parameters:
nodeId
- aInteger
object.- Returns:
- a
Collection
object.
-
findByNodeIdAndIpAddress
public OnmsIpInterface findByNodeIdAndIpAddress(java.lang.Integer nodeId, java.lang.String ipAddress)
findByNodeIdAndIpAddress
- Specified by:
findByNodeIdAndIpAddress
in interfaceIpInterfaceDao
- Parameters:
nodeId
- aInteger
object.ipAddress
- aString
object.- Returns:
- a
OnmsIpInterface
object.
-
findByForeignKeyAndIpAddress
public OnmsIpInterface findByForeignKeyAndIpAddress(java.lang.String foreignSource, java.lang.String foreignId, java.lang.String ipAddress)
findByForeignKeyAndIpAddress
- Specified by:
findByForeignKeyAndIpAddress
in interfaceIpInterfaceDao
- Parameters:
foreignSource
- aString
object.foreignId
- aString
object.ipAddress
- aString
object.- Returns:
- a
OnmsIpInterface
object.
-
findByServiceType
public java.util.List<OnmsIpInterface> findByServiceType(java.lang.String svcName)
findByServiceType
- Specified by:
findByServiceType
in interfaceIpInterfaceDao
- Parameters:
svcName
- aString
object.- Returns:
- a
Collection
object.
-
findHierarchyByServiceType
public java.util.List<OnmsIpInterface> findHierarchyByServiceType(java.lang.String svcName)
findHierarchyByServiceType
- Specified by:
findHierarchyByServiceType
in interfaceIpInterfaceDao
- Parameters:
svcName
- aString
object.- Returns:
- a
Collection
object.
-
getInterfacesForNodes
public java.util.Map<java.net.InetAddress,java.lang.Integer> getInterfacesForNodes()
TODO: This function should filter out deleted interfaces- Specified by:
getInterfacesForNodes
in interfaceIpInterfaceDao
- Returns:
- a
Map
object.
-
addressExistsWithForeignSource
public boolean addressExistsWithForeignSource(java.lang.String ipAddress, java.lang.String foreignSource)
addressExistsWithForeignSource
- Parameters:
ipAddress
- aString
object.foreignSource
- aString
object.- Returns:
- a boolean.
-
findPrimaryInterfaceByNodeId
public OnmsIpInterface findPrimaryInterfaceByNodeId(java.lang.Integer nodeId)
This function should be kept similar toOnmsNode.getPrimaryInterface()
.- Specified by:
findPrimaryInterfaceByNodeId
in interfaceIpInterfaceDao
-
findInterfacesWithMetadata
public java.util.List<OnmsIpInterface> findInterfacesWithMetadata(java.lang.String context, java.lang.String key, java.lang.String value)
- Specified by:
findInterfacesWithMetadata
in interfaceIpInterfaceDao
-
-