public class NodeDaoHibernate extends AbstractDaoHibernate<OnmsNode,Integer> implements NodeDao
NodeDaoHibernate class.
Modifier and Type | Class and Description |
---|---|
static class |
NodeDaoHibernate.SimpleSurveillanceStatus |
m_criteriaConverter
Constructor and Description |
---|
NodeDaoHibernate()
Constructor for NodeDaoHibernate.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteObsoleteInterfaces(Integer nodeId,
Date scanStamp)
deleteObsoleteInterfaces
|
List<OnmsNode> |
findAll()
findAll
|
List<OnmsNode> |
findAllByCategoryList(Collection<OnmsCategory> categories)
findAllByCategoryList
|
List<OnmsNode> |
findAllByCategoryLists(Collection<OnmsCategory> rowCategories,
Collection<OnmsCategory> columnCategories)
findAllByCategoryLists
|
List<OnmsNode> |
findAllByVarCharAssetColumn(String columnName,
String columnValue)
findAllByVarCharAssetColumn
|
List<OnmsNode> |
findAllByVarCharAssetColumnCategoryList(String columnName,
String columnValue,
Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryList
|
List<OnmsNode> |
findAllHavingEgressFlows() |
List<OnmsNode> |
findAllHavingFlows() |
List<OnmsNode> |
findAllHavingIngressFlows() |
List<OnmsNode> |
findAllProvisionedNodes()
findAllProvisionedNodes
|
List<OnmsNode> |
findByCategory(OnmsCategory category)
findByCategory
|
List<OnmsNode> |
findByForeignId(String foreignId)
findByForeignId
|
OnmsNode |
findByForeignId(String foreignSource,
String foreignId)
findByForeignId
|
List<OnmsNode> |
findByForeignIdForLocation(String foreignId,
String location)
findByForeignIdForLocation
|
List<OnmsNode> |
findByForeignSource(String foreignSource)
findByForeignSource
|
List<OnmsNode> |
findByForeignSourceAndIpAddress(String foreignSource,
String ipAddress)
findByForeignSourceAndIpAddress
|
List<OnmsNode> |
findByIpAddressAndService(InetAddress ipAddress,
String serviceName) |
List<OnmsNode> |
findByLabel(String label)
findByLabel
|
List<OnmsNode> |
findByLabelForLocation(String label,
String location)
findByLabel
|
List<OnmsNode> |
findNodeWithMetaData(String context,
String key,
String value) |
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<Integer,String> |
getAllLabelsById()
Retrieves all of node id/label tuples.
|
OnmsNode |
getDefaultFocusPoint() |
Set<String> |
getForeignIdsPerForeignSource(String foreignSource)
getForeignIdsPerForeignSource
|
Map<String,Set<String>> |
getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMap
|
Map<String,Integer> |
getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMap
|
OnmsNode |
getHierarchy(Integer id)
getHierarchy
|
String |
getLabelForId(Integer id)
Test the ability to simply retrieve a String object (node label) without
having to return a bulky Node object.
|
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 foreignSource)
getNodeCountForForeignSource
|
Collection<Integer> |
getNodeIds()
getNodeIds
|
Map<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
|
buildHibernateCallback, bulkDelete, clear, countAll, countMatching, countMatching, delete, delete, deleteAll, find, find, findMatching, findMatching, findObjects, findUnique, flush, get, initDao, initialize, load, lock, merge, queryInt, queryInt, save, saveOrUpdate, update
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
countMatching, findMatching
clear, countAll, countMatching, delete, delete, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
public OnmsNode get(String lookupCriteria)
public String getLabelForId(Integer id)
getLabelForId
in interface NodeDao
public String getLocationForId(Integer id)
NodeDao
getLocationForId
in interface NodeDao
public Map<Integer,String> getAllLabelsById()
getAllLabelsById
in interface NodeDao
Map
containing all node ids and their associated labels.public Map<String,Set<String>> getForeignIdsPerForeignSourceMap()
getForeignIdsPerForeignSourceMap
getForeignIdsPerForeignSourceMap
in interface NodeDao
Map
object.public Set<String> getForeignIdsPerForeignSource(String foreignSource)
getForeignIdsPerForeignSource
getForeignIdsPerForeignSource
in interface NodeDao
foreignSource
- a String
object.Set
object.public List<OnmsNode> findByForeignId(String foreignId)
findByForeignId
findByForeignId
in interface NodeDao
foreignId
- a String
object.List
object.public List<OnmsNode> findByForeignIdForLocation(String foreignId, String location)
findByForeignIdForLocation
findByForeignIdForLocation
in interface NodeDao
foreignId
- a String
object.location
- a String
object.List
object.public OnmsNode getHierarchy(Integer id)
getHierarchy
getHierarchy
in interface NodeDao
id
- a Integer
object.OnmsNode
object.public List<OnmsNode> findByLabel(String label)
findByLabel
findByLabel
in interface NodeDao
label
- a String
object.Collection
object.public List<OnmsNode> findByLabelForLocation(String label, String location)
findByLabel
findByLabelForLocation
in interface NodeDao
label
- a String
object.location
- a String
object.Collection
object.public List<OnmsNode> findAllByVarCharAssetColumn(String columnName, String columnValue)
findAllByVarCharAssetColumn
findAllByVarCharAssetColumn
in interface NodeDao
columnName
- a String
object.columnValue
- a String
object.Collection
object.public List<OnmsNode> findAllByVarCharAssetColumnCategoryList(String columnName, String columnValue, Collection<OnmsCategory> categories)
findAllByVarCharAssetColumnCategoryList
findAllByVarCharAssetColumnCategoryList
in interface NodeDao
columnName
- a String
object.columnValue
- a String
object.categories
- a Collection
object.Collection
object.public List<OnmsNode> findByCategory(OnmsCategory category)
findByCategory
findByCategory
in interface NodeDao
category
- a OnmsCategory
object.Collection
object.public List<OnmsNode> findAllByCategoryList(Collection<OnmsCategory> categories)
findAllByCategoryList
findAllByCategoryList
in interface NodeDao
categories
- a Collection
object.Collection
object.public List<OnmsNode> findAllByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)
findAllByCategoryLists
findAllByCategoryLists
in interface NodeDao
rowCategories
- a Collection
object.columnCategories
- a Collection
object.Collection
object.public SurveillanceStatus findSurveillanceStatusByCategoryLists(Collection<OnmsCategory> rowCategories, Collection<OnmsCategory> columnCategories)
findSurveillanceStatusByCategoryLists
in interface NodeDao
public Map<String,Integer> getForeignIdToNodeIdMap(String foreignSource)
getForeignIdToNodeIdMap
getForeignIdToNodeIdMap
in interface NodeDao
foreignSource
- a String
object.Map
object.public List<OnmsNode> findByForeignSource(String foreignSource)
findByForeignSource
findByForeignSource
in interface NodeDao
foreignSource
- a String
object.List
object.public OnmsNode findByForeignId(String foreignSource, String foreignId)
findByForeignId
findByForeignId
in interface NodeDao
foreignSource
- a String
object.foreignId
- a String
object.OnmsNode
object.public List<OnmsNode> findByForeignSourceAndIpAddress(String foreignSource, String ipAddress)
findByForeignSourceAndIpAddress
findByForeignSourceAndIpAddress
in interface NodeDao
foreignSource
- a String
object.ipAddress
- a String
object.List
object.public int getNodeCountForForeignSource(String foreignSource)
getNodeCountForForeignSource
getNodeCountForForeignSource
in interface NodeDao
foreignSource
- a String
object.public List<OnmsNode> findAllProvisionedNodes()
findAllProvisionedNodes
findAllProvisionedNodes
in interface NodeDao
List
object.public List<OnmsNode> findByIpAddressAndService(InetAddress ipAddress, String serviceName)
findByIpAddressAndService
in interface NodeDao
public List<OnmsIpInterface> findObsoleteIpInterfaces(Integer nodeId, Date scanStamp)
findObsoleteIpInterfaces
findObsoleteIpInterfaces
in interface NodeDao
nodeId
- a Integer
object.scanStamp
- a Date
object.List
object.public void deleteObsoleteInterfaces(Integer nodeId, Date scanStamp)
deleteObsoleteInterfaces
deleteObsoleteInterfaces
in interface NodeDao
nodeId
- a Integer
object.scanStamp
- a Date
object.public void updateNodeScanStamp(Integer nodeId, Date scanStamp)
updateNodeScanStamp
updateNodeScanStamp
in interface NodeDao
nodeId
- a Integer
object.scanStamp
- a Date
object.public Collection<Integer> getNodeIds()
getNodeIds
getNodeIds
in interface NodeDao
Collection
object.public Map<String,Long> getNumberOfNodesBySysOid()
getNumberOfNodesBySysOid
in interface NodeDao
Map
containing the number of nodes for each sysOidpublic Integer getNextNodeId(Integer nodeId)
getNextNodeId
in interface NodeDao
public Integer getPreviousNodeId(Integer nodeId)
getPreviousNodeId
in interface NodeDao
public void markHavingFlows(Collection<Integer> ingressIds, Collection<Integer> egressIds)
markHavingFlows
in interface NodeDao
public List<OnmsNode> findAllHavingFlows()
findAllHavingFlows
in interface NodeDao
public List<OnmsNode> findAllHavingIngressFlows()
findAllHavingIngressFlows
in interface NodeDao
public List<OnmsNode> findAllHavingEgressFlows()
findAllHavingEgressFlows
in interface NodeDao
public OnmsNode getDefaultFocusPoint()
getDefaultFocusPoint
in interface NodeDao
Copyright © 2021. All rights reserved.