Class HwEntityDaoHibernate

    • Constructor Detail

      • HwEntityDaoHibernate

        public HwEntityDaoHibernate()
        The Constructor.
    • Method Detail

      • findRootEntityByNodeId

        public OnmsHwEntity findRootEntityByNodeId​(Integer nodeId)
        Description copied from interface: HwEntityDao
        Better performant than #findRootByNodeId. Useful when dealing with large trees. See NMS-13256 Find root by node id
        Specified by:
        findRootEntityByNodeId in interface HwEntityDao
        Parameters:
        nodeId - the node id
        Returns:
        the OpenNMS hardware entity
      • findEntityByIndex

        public OnmsHwEntity findEntityByIndex​(Integer nodeId,
                                              Integer entPhysicalIndex)
        Description copied from interface: HwEntityDao
        Find entity by index.
        Specified by:
        findEntityByIndex in interface HwEntityDao
        Parameters:
        nodeId - the node id
        entPhysicalIndex - the entity physical index
        Returns:
        the OpenNMS hardware entity
      • findEntityByName

        public OnmsHwEntity findEntityByName​(Integer nodeId,
                                             String entPhysicalName)
        Description copied from interface: HwEntityDao
        Find entity by name.
        Specified by:
        findEntityByName in interface HwEntityDao
        Parameters:
        nodeId - the node id
        entPhysicalName - the entity physical name
        Returns:
        the OpenNMS hardware entity
      • getAttributeValue

        public String getAttributeValue​(Integer nodeId,
                                        Integer entPhysicalIndex,
                                        String attributeName)
        Description copied from interface: HwEntityDao
        Gets the attribute value.
        Specified by:
        getAttributeValue in interface HwEntityDao
        Parameters:
        nodeId - the node id
        entPhysicalIndex - the entity physical index
        attributeName - the name of the desired attribute
        Returns:
        the attribute value
      • getAttributeValue

        public String getAttributeValue​(Integer nodeId,
                                        String nameSource,
                                        String attributeName)
        Description copied from interface: HwEntityDao
        Gets the attribute value.
        Specified by:
        getAttributeValue in interface HwEntityDao
        Parameters:
        nodeId - the node id
        nameSource - 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