Interface NodeDao

    • Method Detail

      • get

        OnmsNode get​(java.lang.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

        java.util.Map<java.lang.Integer,​java.lang.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

        java.lang.String getLabelForId​(java.lang.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

        java.lang.String getLocationForId​(java.lang.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

        java.util.List<OnmsNode> findByLabel​(java.lang.String label)

        findByLabel

        Parameters:
        label - a String object.
        Returns:
        a Collection object.
      • findByLabelForLocation

        java.util.List<OnmsNode> findByLabelForLocation​(java.lang.String label,
                                                        java.lang.String location)

        findByLabel

        Parameters:
        label - a String object.
        location - a String object.
        Returns:
        a Collection object.
      • getHierarchy

        OnmsNode getHierarchy​(java.lang.Integer id)

        getHierarchy

        Parameters:
        id - a Integer object.
        Returns:
        a OnmsNode object.
      • getForeignIdToNodeIdMap

        java.util.Map<java.lang.String,​java.lang.Integer> getForeignIdToNodeIdMap​(java.lang.String foreignSource)

        getForeignIdToNodeIdMap

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

        java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> getForeignIdsPerForeignSourceMap()

        getForeignIdsPerForeignSourceMap

        Returns:
        a Map object.
      • getForeignIdsPerForeignSource

        java.util.Set<java.lang.String> getForeignIdsPerForeignSource​(java.lang.String foreignSource)

        getForeignIdsPerForeignSource

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

        java.util.List<OnmsNode> findAllByVarCharAssetColumn​(java.lang.String columnName,
                                                             java.lang.String columnValue)

        findAllByVarCharAssetColumn

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

        java.util.List<OnmsNode> findAllByVarCharAssetColumnCategoryList​(java.lang.String columnName,
                                                                         java.lang.String columnValue,
                                                                         java.util.Collection<OnmsCategory> categories)

        findAllByVarCharAssetColumnCategoryList

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

        java.util.List<OnmsNode> findByCategory​(OnmsCategory category)

        findByCategory

        Parameters:
        category - a OnmsCategory object.
        Returns:
        a Collection object.
      • findAllByCategoryList

        java.util.List<OnmsNode> findAllByCategoryList​(java.util.Collection<OnmsCategory> categories)

        findAllByCategoryList

        Parameters:
        categories - a Collection object.
        Returns:
        a Collection object.
      • findAllByCategoryLists

        java.util.List<OnmsNode> findAllByCategoryLists​(java.util.Collection<OnmsCategory> rowCatNames,
                                                        java.util.Collection<OnmsCategory> colCatNames)

        findAllByCategoryLists

        Parameters:
        rowCatNames - a Collection object.
        colCatNames - a Collection object.
        Returns:
        a Collection object.
      • findAll

        java.util.List<OnmsNode> findAll()
        Returns a list of nodes ordered by label.
        Specified by:
        findAll in interface OnmsDao<OnmsNode,​java.lang.Integer>
        Returns:
        a List object.
      • findByForeignSource

        java.util.List<OnmsNode> findByForeignSource​(java.lang.String foreignSource)

        findByForeignSource

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

        OnmsNode findByForeignId​(java.lang.String foreignSource,
                                 java.lang.String foreignId)

        findByForeignId

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

        java.util.List<OnmsNode> findByForeignId​(java.lang.String foreignId)

        findByForeignId

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

        java.util.List<OnmsNode> findByForeignIdForLocation​(java.lang.String foreignId,
                                                            java.lang.String location)

        findByForeignIdForLocation

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

        java.util.List<OnmsNode> findByIpAddressAndService​(java.net.InetAddress ipAddress,
                                                           java.lang.String serviceName)
      • getNodeCountForForeignSource

        int getNodeCountForForeignSource​(java.lang.String groupName)

        getNodeCountForForeignSource

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

        java.util.List<OnmsNode> findAllProvisionedNodes()

        findAllProvisionedNodes

        Returns:
        a List object.
      • findObsoleteIpInterfaces

        java.util.List<OnmsIpInterface> findObsoleteIpInterfaces​(java.lang.Integer nodeId,
                                                                 java.util.Date scanStamp)

        findObsoleteIpInterfaces

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

        void deleteObsoleteInterfaces​(java.lang.Integer nodeId,
                                      java.util.Date scanStamp)

        deleteObsoleteInterfaces

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

        void updateNodeScanStamp​(java.lang.Integer nodeId,
                                 java.util.Date scanStamp)

        updateNodeScanStamp

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

        java.util.Collection<java.lang.Integer> getNodeIds()

        getNodeIds

        Returns:
        a Collection object.
      • findByForeignSourceAndIpAddress

        java.util.List<OnmsNode> findByForeignSourceAndIpAddress​(java.lang.String foreignSource,
                                                                 java.lang.String ipAddress)

        findByForeignSourceAndIpAddress

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

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

        java.lang.Integer getNextNodeId​(java.lang.Integer nodeId)
      • getPreviousNodeId

        java.lang.Integer getPreviousNodeId​(java.lang.Integer nodeId)
      • markHavingFlows

        void markHavingFlows​(java.util.Collection<java.lang.Integer> ingressIds,
                             java.util.Collection<java.lang.Integer> egressIds)
      • findAllHavingFlows

        java.util.List<OnmsNode> findAllHavingFlows()
      • findAllHavingIngressFlows

        java.util.List<OnmsNode> findAllHavingIngressFlows()
      • findAllHavingEgressFlows

        java.util.List<OnmsNode> findAllHavingEgressFlows()
      • getDefaultFocusPoint

        OnmsNode getDefaultFocusPoint()
      • findNodeWithMetaData

        java.util.List<OnmsNode> findNodeWithMetaData​(java.lang.String context,
                                                      java.lang.String key,
                                                      java.lang.String value)