Package org.opennms.netmgt.dao.api
Interface NodeDao
-
- All Superinterfaces:
LegacyOnmsDao<OnmsNode,java.lang.Integer>,OnmsDao<OnmsNode,java.lang.Integer>
- All Known Implementing Classes:
MockNodeDao,NodeDaoHibernate
@Repository public interface NodeDao extends LegacyOnmsDao<OnmsNode,java.lang.Integer>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteObsoleteInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)deleteObsoleteInterfacesjava.util.List<OnmsNode>findAll()Returns a list of nodes ordered by label.java.util.List<OnmsNode>findAllByCategoryList(java.util.Collection<OnmsCategory> categories)findAllByCategoryListjava.util.List<OnmsNode>findAllByCategoryLists(java.util.Collection<OnmsCategory> rowCatNames, java.util.Collection<OnmsCategory> colCatNames)findAllByCategoryListsjava.util.List<OnmsNode>findAllByVarCharAssetColumn(java.lang.String columnName, java.lang.String columnValue)findAllByVarCharAssetColumnjava.util.List<OnmsNode>findAllByVarCharAssetColumnCategoryList(java.lang.String columnName, java.lang.String columnValue, java.util.Collection<OnmsCategory> categories)findAllByVarCharAssetColumnCategoryListjava.util.List<OnmsNode>findAllHavingEgressFlows()java.util.List<OnmsNode>findAllHavingFlows()java.util.List<OnmsNode>findAllHavingIngressFlows()java.util.List<OnmsNode>findAllProvisionedNodes()findAllProvisionedNodesjava.util.List<OnmsNode>findByCategory(OnmsCategory category)findByCategoryjava.util.List<OnmsNode>findByForeignId(java.lang.String foreignId)findByForeignIdOnmsNodefindByForeignId(java.lang.String foreignSource, java.lang.String foreignId)findByForeignIdjava.util.List<OnmsNode>findByForeignIdForLocation(java.lang.String foreignId, java.lang.String location)findByForeignIdForLocationjava.util.List<OnmsNode>findByForeignSource(java.lang.String foreignSource)findByForeignSourcejava.util.List<OnmsNode>findByForeignSourceAndIpAddress(java.lang.String foreignSource, java.lang.String ipAddress)findByForeignSourceAndIpAddressjava.util.List<OnmsNode>findByIpAddressAndService(java.net.InetAddress ipAddress, java.lang.String serviceName)java.util.List<OnmsNode>findByLabel(java.lang.String label)findByLabeljava.util.List<OnmsNode>findByLabelForLocation(java.lang.String label, java.lang.String location)findByLabeljava.util.List<OnmsNode>findNodeWithMetaData(java.lang.String context, java.lang.String key, java.lang.String value)java.util.List<OnmsIpInterface>findObsoleteIpInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)findObsoleteIpInterfacesSurveillanceStatusfindSurveillanceStatusByCategoryLists(java.util.Collection<OnmsCategory> rowCategories, java.util.Collection<OnmsCategory> columnCategories)OnmsNodeget(java.lang.String lookupCriteria)Get a node based on it's node ID or foreignSource:foreignIdjava.util.Map<java.lang.Integer,java.lang.String>getAllLabelsById()Retrieves all of node id/label tuples.OnmsNodegetDefaultFocusPoint()java.util.Set<java.lang.String>getForeignIdsPerForeignSource(java.lang.String foreignSource)getForeignIdsPerForeignSourcejava.util.Map<java.lang.String,java.util.Set<java.lang.String>>getForeignIdsPerForeignSourceMap()getForeignIdsPerForeignSourceMapjava.util.Map<java.lang.String,java.lang.Integer>getForeignIdToNodeIdMap(java.lang.String foreignSource)getForeignIdToNodeIdMapOnmsNodegetHierarchy(java.lang.Integer id)getHierarchyjava.lang.StringgetLabelForId(java.lang.Integer id)Light weight call to simply get the node label without loading the entire node.java.lang.StringgetLocationForId(java.lang.Integer id)Light weight call to simply get the node location without loading the entire node.java.lang.IntegergetNextNodeId(java.lang.Integer nodeId)intgetNodeCountForForeignSource(java.lang.String groupName)getNodeCountForForeignSourcejava.util.Collection<java.lang.Integer>getNodeIds()getNodeIdsjava.util.Map<java.lang.String,java.lang.Long>getNumberOfNodesBySysOid()Retrieves the number of nodes for each sysOid.java.lang.IntegergetPreviousNodeId(java.lang.Integer nodeId)voidmarkHavingFlows(java.util.Collection<java.lang.Integer> ingressIds, java.util.Collection<java.lang.Integer> egressIds)voidupdateNodeScanStamp(java.lang.Integer nodeId, java.util.Date scanStamp)updateNodeScanStamp-
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, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
-
-
-
-
Method Detail
-
get
OnmsNode get(java.lang.String lookupCriteria)
Get a node based on it's node ID or foreignSource:foreignId- Parameters:
lookupCriteria- the criteria, either the node ID, or a colon-separated string of foreignSource:foreignId- Returns:
- the node
-
getAllLabelsById
java.util.Map<java.lang.Integer,java.lang.String> getAllLabelsById()
Retrieves all of node id/label tuples. Can be used as a lightweight alternative to findAll().- Returns:
- a
Mapcontaining all node ids and their associated labels.
-
getLabelForId
java.lang.String getLabelForId(java.lang.Integer id)
Light weight call to simply get the node label without loading the entire node.- Parameters:
id-- Returns:
- A String representing the provisioned label for the node. Returns null if not found.
-
getLocationForId
java.lang.String getLocationForId(java.lang.Integer id)
Light weight call to simply get the node location without loading the entire node.- Parameters:
id-- Returns:
- A String representing the provisioned label for the node. Returns null if not found.
-
findByLabel
java.util.List<OnmsNode> findByLabel(java.lang.String label)
findByLabel
- Parameters:
label- aStringobject.- Returns:
- a
Collectionobject.
-
findByLabelForLocation
java.util.List<OnmsNode> findByLabelForLocation(java.lang.String label, java.lang.String location)
findByLabel
- Parameters:
label- aStringobject.location- aStringobject.- Returns:
- a
Collectionobject.
-
getHierarchy
OnmsNode getHierarchy(java.lang.Integer id)
getHierarchy
- Parameters:
id- aIntegerobject.- Returns:
- a
OnmsNodeobject.
-
getForeignIdToNodeIdMap
java.util.Map<java.lang.String,java.lang.Integer> getForeignIdToNodeIdMap(java.lang.String foreignSource)
getForeignIdToNodeIdMap
- Parameters:
foreignSource- aStringobject.- Returns:
- a
Mapobject.
-
getForeignIdsPerForeignSourceMap
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMap
- Returns:
- a
Mapobject.
-
getForeignIdsPerForeignSource
java.util.Set<java.lang.String> getForeignIdsPerForeignSource(java.lang.String foreignSource)
getForeignIdsPerForeignSource
- Parameters:
foreignSource- aStringobject.- Returns:
- a
Setobject.
-
findAllByVarCharAssetColumn
java.util.List<OnmsNode> findAllByVarCharAssetColumn(java.lang.String columnName, java.lang.String columnValue)
findAllByVarCharAssetColumn
- Parameters:
columnName- aStringobject.columnValue- aStringobject.- Returns:
- a
Collectionobject.
-
findAllByVarCharAssetColumnCategoryList
java.util.List<OnmsNode> findAllByVarCharAssetColumnCategoryList(java.lang.String columnName, java.lang.String columnValue, java.util.Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryList
- Parameters:
columnName- aStringobject.columnValue- aStringobject.categories- aCollectionobject.- Returns:
- a
Collectionobject.
-
findByCategory
java.util.List<OnmsNode> findByCategory(OnmsCategory category)
findByCategory
- Parameters:
category- aOnmsCategoryobject.- Returns:
- a
Collectionobject.
-
findAllByCategoryList
java.util.List<OnmsNode> findAllByCategoryList(java.util.Collection<OnmsCategory> categories)
findAllByCategoryList
- Parameters:
categories- aCollectionobject.- Returns:
- a
Collectionobject.
-
findAllByCategoryLists
java.util.List<OnmsNode> findAllByCategoryLists(java.util.Collection<OnmsCategory> rowCatNames, java.util.Collection<OnmsCategory> colCatNames)
findAllByCategoryLists
- Parameters:
rowCatNames- aCollectionobject.colCatNames- aCollectionobject.- Returns:
- a
Collectionobject.
-
findAll
java.util.List<OnmsNode> findAll()
Returns a list of nodes ordered by label.
-
findByForeignSource
java.util.List<OnmsNode> findByForeignSource(java.lang.String foreignSource)
findByForeignSource
- Parameters:
foreignSource- aStringobject.- Returns:
- a
Listobject.
-
findByForeignId
OnmsNode findByForeignId(java.lang.String foreignSource, java.lang.String foreignId)
findByForeignId
- Parameters:
foreignSource- aStringobject.foreignId- aStringobject.- Returns:
- a
OnmsNodeobject.
-
findByForeignId
java.util.List<OnmsNode> findByForeignId(java.lang.String foreignId)
findByForeignId
- Parameters:
foreignId- aStringobject.- Returns:
- a
Listobject.
-
findByForeignIdForLocation
java.util.List<OnmsNode> findByForeignIdForLocation(java.lang.String foreignId, java.lang.String location)
findByForeignIdForLocation
- Parameters:
foreignId- aStringobject.location- aStringobject.- Returns:
- a
Listobject.
-
findByIpAddressAndService
java.util.List<OnmsNode> findByIpAddressAndService(java.net.InetAddress ipAddress, java.lang.String serviceName)
-
getNodeCountForForeignSource
int getNodeCountForForeignSource(java.lang.String groupName)
getNodeCountForForeignSource
- Parameters:
groupName- aStringobject.- Returns:
- a int.
-
findAllProvisionedNodes
java.util.List<OnmsNode> findAllProvisionedNodes()
findAllProvisionedNodes
- Returns:
- a
Listobject.
-
findObsoleteIpInterfaces
java.util.List<OnmsIpInterface> findObsoleteIpInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)
findObsoleteIpInterfaces
- Parameters:
nodeId- aIntegerobject.scanStamp- aDateobject.- Returns:
- a
Listobject.
-
deleteObsoleteInterfaces
void deleteObsoleteInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)deleteObsoleteInterfaces
- Parameters:
nodeId- aIntegerobject.scanStamp- aDateobject.
-
updateNodeScanStamp
void updateNodeScanStamp(java.lang.Integer nodeId, java.util.Date scanStamp)updateNodeScanStamp
- Parameters:
nodeId- aIntegerobject.scanStamp- aDateobject.
-
getNodeIds
java.util.Collection<java.lang.Integer> getNodeIds()
getNodeIds
- Returns:
- a
Collectionobject.
-
findByForeignSourceAndIpAddress
java.util.List<OnmsNode> findByForeignSourceAndIpAddress(java.lang.String foreignSource, java.lang.String ipAddress)
findByForeignSourceAndIpAddress
- Parameters:
foreignSource- aStringobject.ipAddress- aStringobject.- Returns:
- a
Listobject.
-
getNumberOfNodesBySysOid
java.util.Map<java.lang.String,java.lang.Long> getNumberOfNodesBySysOid()
Retrieves the number of nodes for each sysOid.- Returns:
- a
Mapcontaining the number of nodes for each sysOid
-
findSurveillanceStatusByCategoryLists
SurveillanceStatus findSurveillanceStatusByCategoryLists(java.util.Collection<OnmsCategory> rowCategories, java.util.Collection<OnmsCategory> columnCategories)
-
getNextNodeId
java.lang.Integer getNextNodeId(java.lang.Integer nodeId)
-
getPreviousNodeId
java.lang.Integer getPreviousNodeId(java.lang.Integer nodeId)
-
markHavingFlows
void markHavingFlows(java.util.Collection<java.lang.Integer> ingressIds, java.util.Collection<java.lang.Integer> egressIds)
-
findAllHavingFlows
java.util.List<OnmsNode> findAllHavingFlows()
-
findAllHavingIngressFlows
java.util.List<OnmsNode> findAllHavingIngressFlows()
-
findAllHavingEgressFlows
java.util.List<OnmsNode> findAllHavingEgressFlows()
-
getDefaultFocusPoint
OnmsNode getDefaultFocusPoint()
-
findNodeWithMetaData
java.util.List<OnmsNode> findNodeWithMetaData(java.lang.String context, java.lang.String key, java.lang.String value)
-
-