Interface NodeDao

    • 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.
      • getForeignIdToNodeIdMap

        Map<String,​Integer> getForeignIdToNodeIdMap​(String foreignSource)

        getForeignIdToNodeIdMap

        Parameters:
        foreignSource - a String object.
        Returns:
        a Map object.
      • getForeignIdsPerForeignSourceMap

        Map<String,​Set<String>> getForeignIdsPerForeignSourceMap()

        getForeignIdsPerForeignSourceMap

        Returns:
        a Map object.
      • getForeignIdsPerForeignSource

        Set<String> getForeignIdsPerForeignSource​(String foreignSource)

        getForeignIdsPerForeignSource

        Parameters:
        foreignSource - a String object.
        Returns:
        a Set object.
      • findAllByVarCharAssetColumn

        List<OnmsNode> findAllByVarCharAssetColumn​(String columnName,
                                                   String columnValue)

        findAllByVarCharAssetColumn

        Parameters:
        columnName - a String object.
        columnValue - a String object.
        Returns:
        a Collection object.
      • findByForeignSource

        List<OnmsNode> findByForeignSource​(String foreignSource)

        findByForeignSource

        Parameters:
        foreignSource - a String object.
        Returns:
        a List object.
      • findByForeignId

        OnmsNode findByForeignId​(String foreignSource,
                                 String foreignId)

        findByForeignId

        Parameters:
        foreignSource - a String object.
        foreignId - a String object.
        Returns:
        a OnmsNode object.
      • findByForeignId

        List<OnmsNode> findByForeignId​(String foreignId)

        findByForeignId

        Parameters:
        foreignId - a String object.
        Returns:
        a List object.
      • findByForeignIdForLocation

        List<OnmsNode> findByForeignIdForLocation​(String foreignId,
                                                  String location)

        findByForeignIdForLocation

        Parameters:
        foreignId - a String object.
        location - a String object.
        Returns:
        a List object.
      • getNodeCountForForeignSource

        int getNodeCountForForeignSource​(String groupName)

        getNodeCountForForeignSource

        Parameters:
        groupName - a String object.
        Returns:
        a int.
      • findAllProvisionedNodes

        List<OnmsNode> findAllProvisionedNodes()

        findAllProvisionedNodes

        Returns:
        a List object.
      • findObsoleteIpInterfaces

        List<OnmsIpInterface> findObsoleteIpInterfaces​(Integer nodeId,
                                                       Date scanStamp)

        findObsoleteIpInterfaces

        Parameters:
        nodeId - a Integer object.
        scanStamp - a Date object.
        Returns:
        a List object.
      • deleteObsoleteInterfaces

        void deleteObsoleteInterfaces​(Integer nodeId,
                                      Date scanStamp)

        deleteObsoleteInterfaces

        Parameters:
        nodeId - a Integer object.
        scanStamp - a Date object.
      • updateNodeScanStamp

        void updateNodeScanStamp​(Integer nodeId,
                                 Date scanStamp)

        updateNodeScanStamp

        Parameters:
        nodeId - a Integer object.
        scanStamp - a Date object.
      • findByForeignSourceAndIpAddress

        List<OnmsNode> findByForeignSourceAndIpAddress​(String foreignSource,
                                                       String ipAddress)

        findByForeignSourceAndIpAddress

        Parameters:
        foreignSource - a String object.
        ipAddress - a String object.
        Returns:
        a List object.
      • getNumberOfNodesBySysOid

        Map<String,​Long> getNumberOfNodesBySysOid()
        Retrieves the number of nodes for each sysOid.
        Returns:
        a Map containing the number of nodes for each sysOid
      • findAllHavingIngressFlows

        List<OnmsNode> findAllHavingIngressFlows()
      • findAllHavingEgressFlows

        List<OnmsNode> findAllHavingEgressFlows()
      • 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.