org.opennms.netmgt.dao.hibernate
Class NodeDaoHibernate

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

public class NodeDaoHibernate
extends AbstractDaoHibernate<OnmsNode,Integer>
implements NodeDao

NodeDaoHibernate class.

Version:
$Id: $
Author:
Ted Kazmark, David Hustace

Nested Class Summary
static class NodeDaoHibernate.SimpleSurveillanceStatus
           
 
Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
NodeDaoHibernate()
          Constructor for NodeDaoHibernate.
 
Method Summary
 void deleteObsoleteInterfaces(Integer nodeId, Date scanStamp)
          deleteObsoleteInterfaces
 List<OnmsNode> findAll()
          findAll
 Collection<OnmsNode> findAllByCategoryList(Collection<OnmsCategory> categories)
          findAllByCategoryList
 Collection<OnmsNode> findAllByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)
          findAllByCategoryLists
 Collection<OnmsNode> findAllByVarCharAssetColumn(String columnName, String columnValue)
          findAllByVarCharAssetColumn
 Collection<OnmsNode> findAllByVarCharAssetColumnCategoryList(String columnName, String columnValue, Collection<OnmsCategory> categories)
          findAllByVarCharAssetColumnCategoryList
 List<OnmsNode> findAllProvisionedNodes()
          findAllProvisionedNodes
 Collection<OnmsNode> findByCategory(OnmsCategory category)
          findByCategory
 OnmsNode findByForeignId(String foreignSource, String foreignId)
          findByForeignId
 List<OnmsNode> findByForeignSource(String foreignSource)
          findByForeignSource
 List<OnmsNode> findByForeignSourceAndIpAddress(String foreignSource, String ipAddress)
          findByForeignSourceAndIpAddress
 Collection<OnmsNode> findByLabel(String label)
          findByLabel
 Collection<OnmsNode> findNodes(OnmsDistPoller distPoller)
          findNodes
 List<OnmsIpInterface> findObsoleteIpInterfaces(Integer nodeId, Date scanStamp)
          findObsoleteIpInterfaces
 SurveillanceStatus findSurveillanceStatusByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)
           
 OnmsNode get(String lookupCriteria)
          Get a node based on it's node ID or foreignSource:foreignId
 Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)
          getForeignIdToNodeIdMap
 OnmsNode getHierarchy(Integer id)
          getHierarchy
 int getNodeCountForForeignSource(String foreignSource)
          getNodeCountForForeignSource
 Collection<Integer> getNodeIds()
          getNodeIds
 void updateNodeScanStamp(Integer nodeId, Date scanStamp)
          updateNodeScanStamp
 
Methods inherited from class org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate
bulkDelete, clear, countAll, countMatching, delete, deleteAll, evict, find, find, 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, findMatching, flush, get, initialize, load, save, saveOrUpdate, update
 

Constructor Detail

NodeDaoHibernate

public NodeDaoHibernate()

Constructor for NodeDaoHibernate.

Method Detail

get

public OnmsNode get(String lookupCriteria)
Get a node based on it's node ID or foreignSource:foreignId

Specified by:
get in interface NodeDao
Parameters:
lookupCriteria - the criteria, either the node ID, or a colon-separated string of foreignSource:foreignId
Returns:
the node

findNodes

public Collection<OnmsNode> findNodes(OnmsDistPoller distPoller)

findNodes

Specified by:
findNodes in interface NodeDao
Parameters:
distPoller - a OnmsDistPoller object.
Returns:
a Collection object.

getHierarchy

public OnmsNode getHierarchy(Integer id)

getHierarchy

Specified by:
getHierarchy in interface NodeDao
Parameters:
id - a Integer object.
Returns:
a OnmsNode object.

findByLabel

public Collection<OnmsNode> findByLabel(String label)

findByLabel

Specified by:
findByLabel in interface NodeDao
Parameters:
label - a String object.
Returns:
a Collection object.

findAllByVarCharAssetColumn

public Collection<OnmsNode> findAllByVarCharAssetColumn(String columnName,
                                                        String columnValue)

findAllByVarCharAssetColumn

Specified by:
findAllByVarCharAssetColumn in interface NodeDao
Parameters:
columnName - a String object.
columnValue - a String object.
Returns:
a Collection object.

findAllByVarCharAssetColumnCategoryList

public Collection<OnmsNode> findAllByVarCharAssetColumnCategoryList(String columnName,
                                                                    String columnValue,
                                                                    Collection<OnmsCategory> categories)

findAllByVarCharAssetColumnCategoryList

Specified by:
findAllByVarCharAssetColumnCategoryList in interface NodeDao
Parameters:
columnName - a String object.
columnValue - a String object.
categories - a Collection object.
Returns:
a Collection object.

findByCategory

public Collection<OnmsNode> findByCategory(OnmsCategory category)

findByCategory

Specified by:
findByCategory in interface NodeDao
Parameters:
category - a OnmsCategory object.
Returns:
a Collection object.

findAllByCategoryList

public Collection<OnmsNode> findAllByCategoryList(Collection<OnmsCategory> categories)

findAllByCategoryList

Specified by:
findAllByCategoryList in interface NodeDao
Parameters:
categories - a Collection object.
Returns:
a Collection object.

findAllByCategoryLists

public Collection<OnmsNode> findAllByCategoryLists(Collection<OnmsCategory> rowCategories,
                                                   Collection<OnmsCategory> columnCategories)

findAllByCategoryLists

Specified by:
findAllByCategoryLists in interface NodeDao
Parameters:
rowCategories - a Collection object.
columnCategories - a Collection object.
Returns:
a Collection object.

findSurveillanceStatusByCategoryLists

public SurveillanceStatus findSurveillanceStatusByCategoryLists(Collection<OnmsCategory> rowCategories,
                                                                Collection<OnmsCategory> columnCategories)
Specified by:
findSurveillanceStatusByCategoryLists in interface NodeDao

getForeignIdToNodeIdMap

public Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)

getForeignIdToNodeIdMap

Specified by:
getForeignIdToNodeIdMap in interface NodeDao
Parameters:
foreignSource - a String object.
Returns:
a Map object.

findByForeignSource

public List<OnmsNode> findByForeignSource(String foreignSource)

findByForeignSource

Specified by:
findByForeignSource in interface NodeDao
Parameters:
foreignSource - a String object.
Returns:
a List object.

findByForeignId

public OnmsNode findByForeignId(String foreignSource,
                                String foreignId)

findByForeignId

Specified by:
findByForeignId in interface NodeDao
Parameters:
foreignSource - a String object.
foreignId - a String object.
Returns:
a OnmsNode object.

findByForeignSourceAndIpAddress

public List<OnmsNode> findByForeignSourceAndIpAddress(String foreignSource,
                                                      String ipAddress)

findByForeignSourceAndIpAddress

Specified by:
findByForeignSourceAndIpAddress in interface NodeDao
Parameters:
foreignSource - a String object.
ipAddress - a String object.
Returns:
a List object.

getNodeCountForForeignSource

public int getNodeCountForForeignSource(String foreignSource)

getNodeCountForForeignSource

Specified by:
getNodeCountForForeignSource in interface NodeDao
Parameters:
foreignSource - a String object.
Returns:
a int.

findAll

public List<OnmsNode> findAll()

findAll

Specified by:
findAll in interface NodeDao
Specified by:
findAll in interface OnmsDao<OnmsNode,Integer>
Overrides:
findAll in class AbstractDaoHibernate<OnmsNode,Integer>
Returns:
a List object.

findAllProvisionedNodes

public List<OnmsNode> findAllProvisionedNodes()

findAllProvisionedNodes

Specified by:
findAllProvisionedNodes in interface NodeDao
Returns:
a List object.

findObsoleteIpInterfaces

public List<OnmsIpInterface> findObsoleteIpInterfaces(Integer nodeId,
                                                      Date scanStamp)

findObsoleteIpInterfaces

Specified by:
findObsoleteIpInterfaces in interface NodeDao
Parameters:
nodeId - a Integer object.
scanStamp - a Date object.
Returns:
a List object.

deleteObsoleteInterfaces

public void deleteObsoleteInterfaces(Integer nodeId,
                                     Date scanStamp)

deleteObsoleteInterfaces

Specified by:
deleteObsoleteInterfaces in interface NodeDao
Parameters:
nodeId - a Integer object.
scanStamp - a Date object.

updateNodeScanStamp

public void updateNodeScanStamp(Integer nodeId,
                                Date scanStamp)

updateNodeScanStamp

Specified by:
updateNodeScanStamp in interface NodeDao
Parameters:
nodeId - a Integer object.
scanStamp - a Date object.

getNodeIds

public Collection<Integer> getNodeIds()

getNodeIds

Specified by:
getNodeIds in interface NodeDao
Returns:
a Collection object.


Copyright © 2011. All Rights Reserved.