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 void
deleteObsoleteInterfaces(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)
findByForeignIdOnmsNode
findByForeignId(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)
findObsoleteIpInterfacesSurveillanceStatus
findSurveillanceStatusByCategoryLists(java.util.Collection<OnmsCategory> rowCategories, java.util.Collection<OnmsCategory> columnCategories)
OnmsNode
get(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.OnmsNode
getDefaultFocusPoint()
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)
getForeignIdToNodeIdMapOnmsNode
getHierarchy(java.lang.Integer id)
getHierarchyjava.lang.String
getLabelForId(java.lang.Integer id)
Light weight call to simply get the node label without loading the entire node.java.lang.String
getLocationForId(java.lang.Integer id)
Light weight call to simply get the node location without loading the entire node.java.lang.Integer
getNextNodeId(java.lang.Integer nodeId)
int
getNodeCountForForeignSource(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.Integer
getPreviousNodeId(java.lang.Integer nodeId)
void
markHavingFlows(java.util.Collection<java.lang.Integer> ingressIds, java.util.Collection<java.lang.Integer> egressIds)
void
updateNodeScanStamp(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
Map
containing 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
- aString
object.- Returns:
- a
Collection
object.
-
findByLabelForLocation
java.util.List<OnmsNode> findByLabelForLocation(java.lang.String label, java.lang.String location)
findByLabel
- Parameters:
label
- aString
object.location
- aString
object.- Returns:
- a
Collection
object.
-
getHierarchy
OnmsNode getHierarchy(java.lang.Integer id)
getHierarchy
- Parameters:
id
- aInteger
object.- Returns:
- a
OnmsNode
object.
-
getForeignIdToNodeIdMap
java.util.Map<java.lang.String,java.lang.Integer> getForeignIdToNodeIdMap(java.lang.String foreignSource)
getForeignIdToNodeIdMap
- Parameters:
foreignSource
- aString
object.- Returns:
- a
Map
object.
-
getForeignIdsPerForeignSourceMap
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMap
- Returns:
- a
Map
object.
-
getForeignIdsPerForeignSource
java.util.Set<java.lang.String> getForeignIdsPerForeignSource(java.lang.String foreignSource)
getForeignIdsPerForeignSource
- Parameters:
foreignSource
- aString
object.- Returns:
- a
Set
object.
-
findAllByVarCharAssetColumn
java.util.List<OnmsNode> findAllByVarCharAssetColumn(java.lang.String columnName, java.lang.String columnValue)
findAllByVarCharAssetColumn
- Parameters:
columnName
- aString
object.columnValue
- aString
object.- Returns:
- a
Collection
object.
-
findAllByVarCharAssetColumnCategoryList
java.util.List<OnmsNode> findAllByVarCharAssetColumnCategoryList(java.lang.String columnName, java.lang.String columnValue, java.util.Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryList
- Parameters:
columnName
- aString
object.columnValue
- aString
object.categories
- aCollection
object.- Returns:
- a
Collection
object.
-
findByCategory
java.util.List<OnmsNode> findByCategory(OnmsCategory category)
findByCategory
- Parameters:
category
- aOnmsCategory
object.- Returns:
- a
Collection
object.
-
findAllByCategoryList
java.util.List<OnmsNode> findAllByCategoryList(java.util.Collection<OnmsCategory> categories)
findAllByCategoryList
- Parameters:
categories
- aCollection
object.- Returns:
- a
Collection
object.
-
findAllByCategoryLists
java.util.List<OnmsNode> findAllByCategoryLists(java.util.Collection<OnmsCategory> rowCatNames, java.util.Collection<OnmsCategory> colCatNames)
findAllByCategoryLists
- Parameters:
rowCatNames
- aCollection
object.colCatNames
- aCollection
object.- Returns:
- a
Collection
object.
-
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
- aString
object.- Returns:
- a
List
object.
-
findByForeignId
OnmsNode findByForeignId(java.lang.String foreignSource, java.lang.String foreignId)
findByForeignId
- Parameters:
foreignSource
- aString
object.foreignId
- aString
object.- Returns:
- a
OnmsNode
object.
-
findByForeignId
java.util.List<OnmsNode> findByForeignId(java.lang.String foreignId)
findByForeignId
- Parameters:
foreignId
- aString
object.- Returns:
- a
List
object.
-
findByForeignIdForLocation
java.util.List<OnmsNode> findByForeignIdForLocation(java.lang.String foreignId, java.lang.String location)
findByForeignIdForLocation
- Parameters:
foreignId
- aString
object.location
- aString
object.- Returns:
- a
List
object.
-
findByIpAddressAndService
java.util.List<OnmsNode> findByIpAddressAndService(java.net.InetAddress ipAddress, java.lang.String serviceName)
-
getNodeCountForForeignSource
int getNodeCountForForeignSource(java.lang.String groupName)
getNodeCountForForeignSource
- Parameters:
groupName
- aString
object.- Returns:
- a int.
-
findAllProvisionedNodes
java.util.List<OnmsNode> findAllProvisionedNodes()
findAllProvisionedNodes
- Returns:
- a
List
object.
-
findObsoleteIpInterfaces
java.util.List<OnmsIpInterface> findObsoleteIpInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)
findObsoleteIpInterfaces
- Parameters:
nodeId
- aInteger
object.scanStamp
- aDate
object.- Returns:
- a
List
object.
-
deleteObsoleteInterfaces
void deleteObsoleteInterfaces(java.lang.Integer nodeId, java.util.Date scanStamp)
deleteObsoleteInterfaces
- Parameters:
nodeId
- aInteger
object.scanStamp
- aDate
object.
-
updateNodeScanStamp
void updateNodeScanStamp(java.lang.Integer nodeId, java.util.Date scanStamp)
updateNodeScanStamp
- Parameters:
nodeId
- aInteger
object.scanStamp
- aDate
object.
-
getNodeIds
java.util.Collection<java.lang.Integer> getNodeIds()
getNodeIds
- Returns:
- a
Collection
object.
-
findByForeignSourceAndIpAddress
java.util.List<OnmsNode> findByForeignSourceAndIpAddress(java.lang.String foreignSource, java.lang.String ipAddress)
findByForeignSourceAndIpAddress
- Parameters:
foreignSource
- aString
object.ipAddress
- aString
object.- Returns:
- a
List
object.
-
getNumberOfNodesBySysOid
java.util.Map<java.lang.String,java.lang.Long> getNumberOfNodesBySysOid()
Retrieves the number of nodes for each sysOid.- Returns:
- a
Map
containing 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)
-
-