Class GraphParser

    • Constructor Summary

      Constructors 
      Constructor Description
      GraphParser()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> RootGraph<T> parse​(java.lang.Class<T> rootType, java.lang.CharSequence graphText, EntityManager entityManager)
      Creates a root graph based on the passed `rootType` and parses `graphText` into the generated root graph
      static <T> void parseInto​(EntityGraph<T> graph, java.lang.CharSequence graphText, EntityManager entityManager)
      Parses the textual graph representation into the specified graph.
      static <T> void parseInto​(EntityGraph<T> graph, java.lang.CharSequence graphText, EntityManagerFactory entityManagerFactory)
      Parses the textual graph representation into the specified graph.
      static <T> void parseInto​(Subgraph<T> graph, java.lang.CharSequence graphText, EntityManager entityManager)
      Parses the textual graph representation into the specified graph.
      static <T> void parseInto​(Subgraph<T> graph, java.lang.CharSequence graphText, EntityManagerFactory entityManagerFactory)
      Parses the textual graph representation into the specified graph.
      static <T> void parseInto​(Graph<T> graph, java.lang.CharSequence graphText, EntityManager entityManager)
      Parses the textual graph representation into the specified graph.
      static <T> void parseInto​(Graph<T> graph, java.lang.CharSequence graphText, EntityManagerFactory entityManagerFactory)
      Parses the textual graph representation into the specified graph.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GraphParser

        public GraphParser()
    • Method Detail

      • parse

        public static <T> RootGraph<T> parse​(java.lang.Class<T> rootType,
                                             java.lang.CharSequence graphText,
                                             EntityManager entityManager)
        Creates a root graph based on the passed `rootType` and parses `graphText` into the generated root graph
        Parameters:
        rootType - The root entity type
        graphText - The textual representation of the graph
        entityManager - The EntityManager
        Throws:
        InvalidGraphException - if the textual representation is invalid.
        ApiNote:
        The passed EntityManager is expected to be a Hibernate implementation. Attempting to pass another provider's EntityManager implementation will fail
      • parseInto

        public static <T> void parseInto​(Graph<T> graph,
                                         java.lang.CharSequence graphText,
                                         EntityManager entityManager)
        Parses the textual graph representation into the specified graph.
        Parameters:
        graph - The target graph. This is the graph that will be populated by this process
        graphText - Textual representation of the graph
        entityManager - The EntityManager
        Throws:
        InvalidGraphException - if the textual representation is invalid.
      • parseInto

        public static <T> void parseInto​(EntityGraph<T> graph,
                                         java.lang.CharSequence graphText,
                                         EntityManager entityManager)
        Parses the textual graph representation into the specified graph.
        Parameters:
        graph - The target graph. This is the graph that will be populated by this process
        graphText - Textual representation of the graph
        entityManager - The EntityManager
        Throws:
        InvalidGraphException - if the textual representation is invalid.
      • parseInto

        public static <T> void parseInto​(Subgraph<T> graph,
                                         java.lang.CharSequence graphText,
                                         EntityManager entityManager)
        Parses the textual graph representation into the specified graph.
        Parameters:
        graph - The target graph. This is the graph that will be populated by this process
        graphText - Textual representation of the graph
        entityManager - The EntityManager
        Throws:
        InvalidGraphException - if the textual representation is invalid.
      • parseInto

        public static <T> void parseInto​(Graph<T> graph,
                                         java.lang.CharSequence graphText,
                                         EntityManagerFactory entityManagerFactory)
        Parses the textual graph representation into the specified graph.
        Parameters:
        graph - The target graph. This is the graph that will be populated by this process
        graphText - Textual representation of the graph
        entityManagerFactory - The EntityManagerFactory
        Throws:
        InvalidGraphException - if the textual representation is invalid.
      • parseInto

        public static <T> void parseInto​(EntityGraph<T> graph,
                                         java.lang.CharSequence graphText,
                                         EntityManagerFactory entityManagerFactory)
        Parses the textual graph representation into the specified graph.
        Parameters:
        graph - The target graph. This is the graph that will be populated by this process
        graphText - Textual representation of the graph
        entityManagerFactory - The EntityManagerFactory
        Throws:
        InvalidGraphException - if the textual representation is invalid.
      • parseInto

        public static <T> void parseInto​(Subgraph<T> graph,
                                         java.lang.CharSequence graphText,
                                         EntityManagerFactory entityManagerFactory)
        Parses the textual graph representation into the specified graph.
        Parameters:
        graph - The target graph. This is the graph that will be populated by this process
        graphText - Textual representation of the graph
        entityManagerFactory - The EntityManagerFactory
        Throws:
        InvalidGraphException - if the textual representation is invalid.