Package org.opennms.netmgt.dao.api
Interface NodeDao
-
- All Known Implementing Classes:
MockNodeDao
,NodeDaoHibernate
@Repository public interface NodeDao extends LegacyOnmsDao<OnmsNode,Integer>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteObsoleteInterfaces(Integer nodeId, Date scanStamp)
deleteObsoleteInterfacesList<OnmsNode>
findAll()
Returns a list of nodes ordered by label.List<OnmsNode>
findAllByCategoryList(Collection<OnmsCategory> categories)
findAllByCategoryListList<OnmsNode>
findAllByCategoryLists(Collection<OnmsCategory> rowCatNames, Collection<OnmsCategory> colCatNames)
findAllByCategoryListsList<OnmsNode>
findAllByVarCharAssetColumn(String columnName, String columnValue)
findAllByVarCharAssetColumnList<OnmsNode>
findAllByVarCharAssetColumnCategoryList(String columnName, String columnValue, Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryListList<OnmsNode>
findAllHavingEgressFlows()
List<OnmsNode>
findAllHavingFlows()
List<OnmsNode>
findAllHavingIngressFlows()
List<OnmsNode>
findAllProvisionedNodes()
findAllProvisionedNodesList<OnmsNode>
findByCategory(OnmsCategory category)
findByCategoryList<OnmsNode>
findByForeignId(String foreignId)
findByForeignIdOnmsNode
findByForeignId(String foreignSource, String foreignId)
findByForeignIdList<OnmsNode>
findByForeignIdForLocation(String foreignId, String location)
findByForeignIdForLocationList<OnmsNode>
findByForeignSource(String foreignSource)
findByForeignSourceList<OnmsNode>
findByForeignSourceAndIpAddress(String foreignSource, String ipAddress)
findByForeignSourceAndIpAddressList<OnmsNode>
findByIpAddressAndService(InetAddress ipAddress, String serviceName)
List<OnmsNode>
findByLabel(String label)
findByLabelList<OnmsNode>
findByLabelForLocation(String label, String location)
findByLabelList<OnmsNode>
findBySysNameOfLldpLinksOfNode(int nodeId)
Returns all OnmsNodes that have a sysname that matches remSysName of an lldp link that is related to the given node.List<OnmsNode>
findNodeWithMetaData(String context, String key, String value)
List<OnmsIpInterface>
findObsoleteIpInterfaces(Integer nodeId, Date scanStamp)
findObsoleteIpInterfacesSurveillanceStatus
findSurveillanceStatusByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)
OnmsNode
get(String lookupCriteria)
Get a node based on it's node ID or foreignSource:foreignIdMap<Integer,String>
getAllLabelsById()
Retrieves all of node id/label tuples.OnmsNode
getDefaultFocusPoint()
Set<String>
getForeignIdsPerForeignSource(String foreignSource)
getForeignIdsPerForeignSourceMap<String,Set<String>>
getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMapMap<String,Integer>
getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMapOnmsNode
getHierarchy(Integer id)
getHierarchyString
getLabelForId(Integer id)
Light weight call to simply get the node label without loading the entire node.String
getLocationForId(Integer id)
Light weight call to simply get the node location without loading the entire node.Integer
getNextNodeId(Integer nodeId)
int
getNodeCountForForeignSource(String groupName)
getNodeCountForForeignSourceCollection<Integer>
getNodeIds()
getNodeIdsMap<String,Long>
getNumberOfNodesBySysOid()
Retrieves the number of nodes for each sysOid.Integer
getPreviousNodeId(Integer nodeId)
void
markHavingFlows(Collection<Integer> ingressIds, Collection<Integer> egressIds)
void
updateNodeScanStamp(Integer nodeId, 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(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
Map<Integer,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
String getLabelForId(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
String getLocationForId(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
List<OnmsNode> findByLabel(String label)
findByLabel
- Parameters:
label
- aString
object.- Returns:
- a
Collection
object.
-
findByLabelForLocation
List<OnmsNode> findByLabelForLocation(String label, String location)
findByLabel
- Parameters:
label
- aString
object.location
- aString
object.- Returns:
- a
Collection
object.
-
getForeignIdToNodeIdMap
Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMap
-
getForeignIdsPerForeignSourceMap
Map<String,Set<String>> getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMap
- Returns:
- a
Map
object.
-
getForeignIdsPerForeignSource
Set<String> getForeignIdsPerForeignSource(String foreignSource)
getForeignIdsPerForeignSource
-
findAllByVarCharAssetColumn
List<OnmsNode> findAllByVarCharAssetColumn(String columnName, String columnValue)
findAllByVarCharAssetColumn
- Parameters:
columnName
- aString
object.columnValue
- aString
object.- Returns:
- a
Collection
object.
-
findAllByVarCharAssetColumnCategoryList
List<OnmsNode> findAllByVarCharAssetColumnCategoryList(String columnName, String columnValue, Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryList
- Parameters:
columnName
- aString
object.columnValue
- aString
object.categories
- aCollection
object.- Returns:
- a
Collection
object.
-
findByCategory
List<OnmsNode> findByCategory(OnmsCategory category)
findByCategory
- Parameters:
category
- aOnmsCategory
object.- Returns:
- a
Collection
object.
-
findAllByCategoryList
List<OnmsNode> findAllByCategoryList(Collection<OnmsCategory> categories)
findAllByCategoryList
- Parameters:
categories
- aCollection
object.- Returns:
- a
Collection
object.
-
findAllByCategoryLists
List<OnmsNode> findAllByCategoryLists(Collection<OnmsCategory> rowCatNames, Collection<OnmsCategory> colCatNames)
findAllByCategoryLists
- Parameters:
rowCatNames
- aCollection
object.colCatNames
- aCollection
object.- Returns:
- a
Collection
object.
-
findByForeignIdForLocation
List<OnmsNode> findByForeignIdForLocation(String foreignId, String location)
findByForeignIdForLocation
-
findByIpAddressAndService
List<OnmsNode> findByIpAddressAndService(InetAddress ipAddress, String serviceName)
-
getNodeCountForForeignSource
int getNodeCountForForeignSource(String groupName)
getNodeCountForForeignSource
- Parameters:
groupName
- aString
object.- Returns:
- a int.
-
findAllProvisionedNodes
List<OnmsNode> findAllProvisionedNodes()
findAllProvisionedNodes
- Returns:
- a
List
object.
-
findObsoleteIpInterfaces
List<OnmsIpInterface> findObsoleteIpInterfaces(Integer nodeId, Date scanStamp)
findObsoleteIpInterfaces
-
deleteObsoleteInterfaces
void deleteObsoleteInterfaces(Integer nodeId, Date scanStamp)
deleteObsoleteInterfaces
-
getNodeIds
Collection<Integer> getNodeIds()
getNodeIds
- Returns:
- a
Collection
object.
-
findByForeignSourceAndIpAddress
List<OnmsNode> findByForeignSourceAndIpAddress(String foreignSource, String ipAddress)
findByForeignSourceAndIpAddress
-
getNumberOfNodesBySysOid
Map<String,Long> getNumberOfNodesBySysOid()
Retrieves the number of nodes for each sysOid.- Returns:
- a
Map
containing the number of nodes for each sysOid
-
findSurveillanceStatusByCategoryLists
SurveillanceStatus findSurveillanceStatusByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)
-
markHavingFlows
void markHavingFlows(Collection<Integer> ingressIds, Collection<Integer> egressIds)
-
getDefaultFocusPoint
OnmsNode getDefaultFocusPoint()
-
findBySysNameOfLldpLinksOfNode
List<OnmsNode> findBySysNameOfLldpLinksOfNode(int nodeId)
Returns all OnmsNodes that have a sysname that matches remSysName of an lldp link that is related to the given node. Used to retrieve all OnmsNodes that need to be accessed when finding the lldp links of a node.
-
-