Package org.opennms.netmgt.dao.api
Interface HwEntityDao
-
- All Superinterfaces:
OnmsDao<OnmsHwEntity,java.lang.Integer>
- All Known Implementing Classes:
HwEntityDaoHibernate,MockHwEntityDao
public interface HwEntityDao extends OnmsDao<OnmsHwEntity,java.lang.Integer>
The Interface HwEntityDao.- Author:
- Alejandro Galue
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OnmsHwEntityfindEntityByIndex(java.lang.Integer nodeId, java.lang.Integer entPhysicalIndex)Find entity by index.OnmsHwEntityfindEntityByName(java.lang.Integer nodeId, java.lang.String entPhysicalName)Find entity by name.OnmsHwEntityfindRootByNodeId(java.lang.Integer nodeId)Find root by node id.OnmsHwEntityfindRootEntityByNodeId(java.lang.Integer nodeId)Better performant than #findRootByNodeId.java.lang.StringgetAttributeValue(java.lang.Integer nodeId, java.lang.Integer entPhysicalIndex, java.lang.String attributeName)Gets the attribute value.java.lang.StringgetAttributeValue(java.lang.Integer nodeId, java.lang.String nameSource, java.lang.String attributeName)Gets the attribute value.-
Methods inherited from interface org.opennms.netmgt.dao.api.OnmsDao
clear, countAll, countMatching, delete, delete, findAll, findMatching, flush, get, initialize, load, lock, save, saveOrUpdate, update
-
-
-
-
Method Detail
-
findRootByNodeId
OnmsHwEntity findRootByNodeId(java.lang.Integer nodeId)
Find root by node id.- Parameters:
nodeId- the node id- Returns:
- the OpenNMS hardware entity
-
findRootEntityByNodeId
OnmsHwEntity findRootEntityByNodeId(java.lang.Integer nodeId)
Better performant than #findRootByNodeId. Useful when dealing with large trees. See NMS-13256 Find root by node id- Parameters:
nodeId- the node id- Returns:
- the OpenNMS hardware entity
-
findEntityByIndex
OnmsHwEntity findEntityByIndex(java.lang.Integer nodeId, java.lang.Integer entPhysicalIndex)
Find entity by index.- Parameters:
nodeId- the node identPhysicalIndex- the entity physical index- Returns:
- the OpenNMS hardware entity
-
findEntityByName
OnmsHwEntity findEntityByName(java.lang.Integer nodeId, java.lang.String entPhysicalName)
Find entity by name.- Parameters:
nodeId- the node identPhysicalName- the entity physical name- Returns:
- the OpenNMS hardware entity
-
getAttributeValue
java.lang.String getAttributeValue(java.lang.Integer nodeId, java.lang.Integer entPhysicalIndex, java.lang.String attributeName)Gets the attribute value.- Parameters:
nodeId- the node identPhysicalIndex- the entity physical indexattributeName- the name of the desired attribute- Returns:
- the attribute value
-
getAttributeValue
java.lang.String getAttributeValue(java.lang.Integer nodeId, java.lang.String nameSource, java.lang.String attributeName)Gets the attribute value.- Parameters:
nodeId- the node idnameSource- either the value of entPhysicalName or a regular expression to be applied over the entPhysicalName (should start with '~')attributeName- the name of the desired attribute- Returns:
- the attribute value
-
-