Class AbstractNestedSetService

    • Method Detail

      • getAncestors

         final List<T> getAncestors(T entity)

        Get ancestors of a node.

        Parameters:
        entity - The node whose ancestors are to be found.
        Returns:

        A list of ancestor nodes.

      • getDescendants

         final List<T> getDescendants(T entity)

        Get descendants of a node.

        Parameters:
        entity - The node whose descendants are to be found.
        Returns:

        A list of descendant nodes.

      • moveUp

         T moveUp(T node)

        Move a node up in the tree.

        Parameters:
        node - The node to be moved up.
        Returns:

        The updated node.

      • moveDown

         T moveDown(T node)

        Move a node down in the tree.

        Parameters:
        node - The node to be moved down.
        Returns:

        The updated node.