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 voiddeleteObsoleteInterfaces(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)findByForeignIdOnmsNodefindByForeignId(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>findNodeWithMetaData(String context, String key, String value)List<OnmsIpInterface>findObsoleteIpInterfaces(Integer nodeId, Date scanStamp)findObsoleteIpInterfacesSurveillanceStatusfindSurveillanceStatusByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)OnmsNodeget(String lookupCriteria)Get a node based on it's node ID or foreignSource:foreignIdMap<Integer,String>getAllLabelsById()Retrieves all of node id/label tuples.OnmsNodegetDefaultFocusPoint()Set<String>getForeignIdsPerForeignSource(String foreignSource)getForeignIdsPerForeignSourceMap<String,Set<String>>getForeignIdsPerForeignSourceMap()getForeignIdsPerForeignSourceMapMap<String,Integer>getForeignIdToNodeIdMap(String foreignSource)getForeignIdToNodeIdMapOnmsNodegetHierarchy(Integer id)getHierarchyStringgetLabelForId(Integer id)Light weight call to simply get the node label without loading the entire node.StringgetLocationForId(Integer id)Light weight call to simply get the node location without loading the entire node.IntegergetNextNodeId(Integer nodeId)intgetNodeCountForForeignSource(String groupName)getNodeCountForForeignSourceCollection<Integer>getNodeIds()getNodeIdsMap<String,Long>getNumberOfNodesBySysOid()Retrieves the number of nodes for each sysOid.IntegergetPreviousNodeId(Integer nodeId)voidmarkHavingFlows(Collection<Integer> ingressIds, Collection<Integer> egressIds)voidupdateNodeScanStamp(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
Mapcontaining 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- aStringobject.- Returns:
- a
Collectionobject.
-
findByLabelForLocation
List<OnmsNode> findByLabelForLocation(String label, String location)
findByLabel
- Parameters:
label- aStringobject.location- aStringobject.- Returns:
- a
Collectionobject.
-
getForeignIdToNodeIdMap
Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMap
-
getForeignIdsPerForeignSourceMap
Map<String,Set<String>> getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMap
- Returns:
- a
Mapobject.
-
getForeignIdsPerForeignSource
Set<String> getForeignIdsPerForeignSource(String foreignSource)
getForeignIdsPerForeignSource
-
findAllByVarCharAssetColumn
List<OnmsNode> findAllByVarCharAssetColumn(String columnName, String columnValue)
findAllByVarCharAssetColumn
- Parameters:
columnName- aStringobject.columnValue- aStringobject.- Returns:
- a
Collectionobject.
-
findAllByVarCharAssetColumnCategoryList
List<OnmsNode> findAllByVarCharAssetColumnCategoryList(String columnName, String columnValue, Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryList
- Parameters:
columnName- aStringobject.columnValue- aStringobject.categories- aCollectionobject.- Returns:
- a
Collectionobject.
-
findByCategory
List<OnmsNode> findByCategory(OnmsCategory category)
findByCategory
- Parameters:
category- aOnmsCategoryobject.- Returns:
- a
Collectionobject.
-
findAllByCategoryList
List<OnmsNode> findAllByCategoryList(Collection<OnmsCategory> categories)
findAllByCategoryList
- Parameters:
categories- aCollectionobject.- Returns:
- a
Collectionobject.
-
findAllByCategoryLists
List<OnmsNode> findAllByCategoryLists(Collection<OnmsCategory> rowCatNames, Collection<OnmsCategory> colCatNames)
findAllByCategoryLists
- Parameters:
rowCatNames- aCollectionobject.colCatNames- aCollectionobject.- Returns:
- a
Collectionobject.
-
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- aStringobject.- Returns:
- a int.
-
findAllProvisionedNodes
List<OnmsNode> findAllProvisionedNodes()
findAllProvisionedNodes
- Returns:
- a
Listobject.
-
findObsoleteIpInterfaces
List<OnmsIpInterface> findObsoleteIpInterfaces(Integer nodeId, Date scanStamp)
findObsoleteIpInterfaces
-
deleteObsoleteInterfaces
void deleteObsoleteInterfaces(Integer nodeId, Date scanStamp)
deleteObsoleteInterfaces
-
getNodeIds
Collection<Integer> getNodeIds()
getNodeIds
- Returns:
- a
Collectionobject.
-
findByForeignSourceAndIpAddress
List<OnmsNode> findByForeignSourceAndIpAddress(String foreignSource, String ipAddress)
findByForeignSourceAndIpAddress
-
getNumberOfNodesBySysOid
Map<String,Long> getNumberOfNodesBySysOid()
Retrieves the number of nodes for each sysOid.- Returns:
- a
Mapcontaining 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()
-
-