Interface NestedSetManager

All Known Implementing Classes:
JpaNestedSetManager

public interface NestedSetManager
A NestedSetManager is used to read and manipulate the nested set tree structure of classes that implement NodeInfo using and where each instance thus has a position in a nested set tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the NestedSetManager, removing all managed nodes from the NestedSetManager.
    <T extends NodeInfo>
    Node<T>
    createRoot(T root)
    Creates a root node for the given NodeInfo instance.
    <T extends NodeInfo>
    Node<T>
    fetchTree(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent)
    Fetches the complete tree, returning the root node of the tree.
    <T extends NodeInfo>
    Node<T>
    fetchTree(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent, int rootId)
    Fetches a complete tree, returning the root node of the tree.
    <T extends NodeInfo>
    List<Node<T>>
    fetchTreeAsList(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent)
    Fetches a complete tree and returns the tree as a list.
    <T extends NodeInfo>
    List<Node<T>>
    fetchTreeAsList(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent, int rootId)
    Fetches a complete tree and returns the tree as a list.
    getConfig(Class<?> clazz)
     
    javax.persistence.EntityManager
    Gets the EntityManager used by this NestedSetManager.
    <T extends NodeInfo>
    Node<T>
    getNode(T nodeInfo)
    Gets the node that represents the given NodeInfo instance in the tree.
    Gets a collection of all nodes currently managed by the NestedSetManager.
    <T extends NodeInfo>
    void
    update(Node<T> node)
     
    <T extends NodeInfo>
    void
    update(T nodeInfo)
     
  • Method Details

    • clear

      void clear()
      Clears the NestedSetManager, removing all managed nodes from the NestedSetManager. Any entities wrapped by such nodes are not detached from the underlying EntityManager.
    • createRoot

      <T extends NodeInfo> Node<T> createRoot(T root)
      Creates a root node for the given NodeInfo instance.
      Type Parameters:
      T -
      Parameters:
      root -
      Returns:
      The created node instance.
    • fetchTree

      <T extends NodeInfo> Node<T> fetchTree(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent, int rootId)
      Fetches a complete tree, returning the root node of the tree.
      Type Parameters:
      T -
      Parameters:
      clazz -
      rootId -
      Returns:
      The root node of the tree.
    • fetchTree

      <T extends NodeInfo> Node<T> fetchTree(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent)
      Fetches the complete tree, returning the root node of the tree.
      Type Parameters:
      T -
      Parameters:
      clazz -
      filtrationCriteria -
      parent -
      Returns:
      The root node of the tree.
    • fetchTreeAsList

      <T extends NodeInfo> List<Node<T>> fetchTreeAsList(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent)
      Fetches a complete tree and returns the tree as a list.
      Type Parameters:
      T -
      Parameters:
      clazz -
      Returns:
      The tree in form of a list, starting with the root node.
    • fetchTreeAsList

      <T extends NodeInfo> List<Node<T>> fetchTreeAsList(Class<T> clazz, org.eclipse.persistence.expressions.Expression filtrationCriteria, T parent, int rootId)
      Fetches a complete tree and returns the tree as a list.
      Type Parameters:
      T -
      Parameters:
      clazz -
      rootId -
      Returns:
      The tree in form of a list, starting with the root node.
    • getEntityManager

      javax.persistence.EntityManager getEntityManager()
      Gets the EntityManager used by this NestedSetManager.
      Returns:
      The EntityManager.
    • getNode

      <T extends NodeInfo> Node<T> getNode(T nodeInfo)
      Gets the node that represents the given NodeInfo instance in the tree.
      Type Parameters:
      T -
      Parameters:
      nodeInfo -
      Returns:
      The node.
    • getNodes

      Collection<Node<?>> getNodes()
      Gets a collection of all nodes currently managed by the NestedSetManager.
      Returns:
      The collection of nodes.
    • update

      <T extends NodeInfo> void update(T nodeInfo)
    • update

      <T extends NodeInfo> void update(Node<T> node)
    • getConfig

      Configuration getConfig(Class<?> clazz)