Interface RootGraph<J>

All Superinterfaces:
EntityGraph<J>, Graph<J>, GraphNode<J>
All Known Subinterfaces:
RootGraphImplementor<J>
All Known Implementing Classes:
RootGraphImpl

public interface RootGraph<J> extends Graph<J>, EntityGraph<J>
Extends the JPA-defined EntityGraph with additional operations.
Author:
Steve Ebersole, Andrea Boriero
See Also:
  • Method Details

    • makeRootGraph

      RootGraph<J> makeRootGraph(String name, boolean mutable)
      Description copied from interface: Graph
      Create a named root Graph if the given name is not null.
      Specified by:
      makeRootGraph in interface Graph<J>
      mutable - controls whether the resulting Graph is mutable
    • makeSubGraph

      SubGraph<J> makeSubGraph(boolean mutable)
      Description copied from interface: Graph
      Create a new (mutable or immutable) SubGraph rooted at this Graph.
      Specified by:
      makeSubGraph in interface Graph<J>
    • addSubclassSubgraph

      <T1> SubGraph<? extends T1> addSubclassSubgraph(Class<? extends T1> type)
      Description copied from interface: EntityGraph
      Add additional attributes to this entity graph that correspond to attributes of subclasses of this EntityGraph's entity type. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs.
      Specified by:
      addSubclassSubgraph in interface EntityGraph<J>
      Parameters:
      type - entity subclass
      Returns:
      subgraph for the subclass
    • getAttributeNodes

      default List<AttributeNode<?>> getAttributeNodes()
      Description copied from interface: EntityGraph
      Return the attribute nodes of this entity that are included in the entity graph.
      Specified by:
      getAttributeNodes in interface EntityGraph<J>
      Returns:
      attribute nodes for the annotated entity type or empty list if none have been defined
    • addAttributeNodes

      default void addAttributeNodes(String... names)
      Description copied from interface: EntityGraph
      Add one or more attribute nodes to the entity graph.
      Specified by:
      addAttributeNodes in interface EntityGraph<J>
      Parameters:
      names - name of the attribute
    • addAttributeNodes

      default void addAttributeNodes(Attribute<J,?>... attributes)
      Description copied from interface: EntityGraph
      Add one or more attribute nodes to the entity graph.
      Specified by:
      addAttributeNodes in interface EntityGraph<J>
      Parameters:
      attributes - attribute
    • addSubgraph

      default <X> SubGraph<X> addSubgraph(Attribute<J,X> attribute)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a managed type. This allows for construction of multi-node entity graphs that include related managed types.
      Specified by:
      addSubgraph in interface EntityGraph<J>
      Parameters:
      attribute - attribute
      Returns:
      subgraph for the attribute
    • addSubgraph

      default <X> SubGraph<? extends X> addSubgraph(Attribute<J,X> attribute, Class<? extends X> type)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs.
      Specified by:
      addSubgraph in interface EntityGraph<J>
      Parameters:
      attribute - attribute
      type - entity subclass
      Returns:
      subgraph for the attribute
    • addSubgraph

      default <X> SubGraph<X> addSubgraph(String name)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a managed type. This allows for construction of multi-node entity graphs that include related managed types.
      Specified by:
      addSubgraph in interface EntityGraph<J>
      Parameters:
      name - name of the attribute
      Returns:
      subgraph for the attribute
    • addSubgraph

      default <X> SubGraph<X> addSubgraph(String name, Class<X> type)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a managed type with inheritance. This allows for multiple subclass subgraphs to be defined for this node of the entity graph. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs.
      Specified by:
      addSubgraph in interface EntityGraph<J>
      Parameters:
      name - name of the attribute
      type - entity subclass
      Returns:
      subgraph for the attribute
    • addKeySubgraph

      default <X> SubGraph<X> addKeySubgraph(Attribute<J,X> attribute)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multi-node entity graphs that include related managed types.
      Specified by:
      addKeySubgraph in interface EntityGraph<J>
      Parameters:
      attribute - attribute
      Returns:
      subgraph for the key attribute
    • addKeySubgraph

      default <X> SubGraph<? extends X> addKeySubgraph(Attribute<J,X> attribute, Class<? extends X> type)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will include the specified attributes of superclass subgraphs.
      Specified by:
      addKeySubgraph in interface EntityGraph<J>
      Parameters:
      attribute - attribute
      type - entity subclass
      Returns:
      subgraph for the key attribute
    • addKeySubgraph

      default <X> SubGraph<X> addKeySubgraph(String name)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multi-node entity graphs that include related managed types.
      Specified by:
      addKeySubgraph in interface EntityGraph<J>
      Parameters:
      name - name of the attribute
      Returns:
      subgraph for the key attribute
    • addKeySubgraph

      default <X> Subgraph<X> addKeySubgraph(String name, Class<X> type)
      Description copied from interface: EntityGraph
      Add a node to the graph that corresponds to a map key that is a managed type with inheritance. This allows for construction of multi-node entity graphs that include related managed types. Subclass subgraphs will automatically include the specified attributes of superclass subgraphs
      Specified by:
      addKeySubgraph in interface EntityGraph<J>
      Parameters:
      name - name of the attribute
      type - entity subclass
      Returns:
      subgraph for the key attribute