Package org.hibernate.graph
Interface RootGraph<J>
- All Superinterfaces:
EntityGraph<J>,Graph<J>,GraphNode<J>
- All Known Subinterfaces:
RootGraphImplementor<J>
- All Known Implementing Classes:
RootGraphImpl
Extends the JPA-defined
EntityGraph with additional operations.- Author:
- Steve Ebersole, Andrea Boriero
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddAttributeNodes(Attribute<J, ?>... attributes) Add one or more attribute nodes to the entity graph.default voidaddAttributeNodes(String... names) Add one or more attribute nodes to the entity graph.default <X> SubGraph<X>addKeySubgraph(Attribute<J, X> attribute) Add a node to the graph that corresponds to a map key that is a managed type.default <X> SubGraph<? extends X>addKeySubgraph(Attribute<J, X> attribute, Class<? extends X> type) Add a node to the graph that corresponds to a map key that is a managed type with inheritance.default <X> SubGraph<X>addKeySubgraph(String name) Add a node to the graph that corresponds to a map key that is a managed type.default <X> Subgraph<X>addKeySubgraph(String name, Class<X> type) Add a node to the graph that corresponds to a map key that is a managed type with inheritance.<T1> SubGraph<? extends T1>addSubclassSubgraph(Class<? extends T1> type) Add additional attributes to this entity graph that correspond to attributes of subclasses of this EntityGraph's entity type.default <X> SubGraph<X>addSubgraph(Attribute<J, X> attribute) Add a node to the graph that corresponds to a managed type.default <X> SubGraph<? extends X>addSubgraph(Attribute<J, X> attribute, Class<? extends X> type) Add a node to the graph that corresponds to a managed type with inheritance.default <X> SubGraph<X>addSubgraph(String name) Add a node to the graph that corresponds to a managed type.default <X> SubGraph<X>addSubgraph(String name, Class<X> type) Add a node to the graph that corresponds to a managed type with inheritance.default List<AttributeNode<?>>Return the attribute nodes of this entity that are included in the entity graph.makeRootGraph(String name, boolean mutable) Create a named rootGraphif the given name is not null.makeSubGraph(boolean mutable) Methods inherited from interface jakarta.persistence.EntityGraph
getNameMethods inherited from interface org.hibernate.graph.Graph
addAttributeNode, addAttributeNode, addKeySubGraph, addKeySubGraph, addKeySubGraph, addKeySubGraph, addPluralSubgraph, addSubGraph, addSubGraph, addSubGraph, addSubGraph, findAttributeNode, findAttributeNode, getAttributeNodeList, getGraphAttributeNodes, getGraphedType, makeCopy
-
Method Details
-
makeRootGraph
Description copied from interface:GraphCreate a named rootGraphif the given name is not null.- Specified by:
makeRootGraphin interfaceGraph<J>mutable- controls whether the resultingGraphis mutable
-
makeSubGraph
Description copied from interface:Graph- Specified by:
makeSubGraphin interfaceGraph<J>
-
addSubclassSubgraph
Description copied from interface:EntityGraphAdd 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:
addSubclassSubgraphin interfaceEntityGraph<J>- Parameters:
type- entity subclass- Returns:
- subgraph for the subclass
-
getAttributeNodes
Description copied from interface:EntityGraphReturn the attribute nodes of this entity that are included in the entity graph.- Specified by:
getAttributeNodesin interfaceEntityGraph<J>- Returns:
- attribute nodes for the annotated entity type or empty list if none have been defined
-
addAttributeNodes
Description copied from interface:EntityGraphAdd one or more attribute nodes to the entity graph.- Specified by:
addAttributeNodesin interfaceEntityGraph<J>- Parameters:
names- name of the attribute
-
addAttributeNodes
Description copied from interface:EntityGraphAdd one or more attribute nodes to the entity graph.- Specified by:
addAttributeNodesin interfaceEntityGraph<J>- Parameters:
attributes- attribute
-
addSubgraph
Description copied from interface:EntityGraphAdd 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:
addSubgraphin interfaceEntityGraph<J>- Parameters:
attribute- attribute- Returns:
- subgraph for the attribute
-
addSubgraph
Description copied from interface:EntityGraphAdd 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:
addSubgraphin interfaceEntityGraph<J>- Parameters:
attribute- attributetype- entity subclass- Returns:
- subgraph for the attribute
-
addSubgraph
Description copied from interface:EntityGraphAdd 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:
addSubgraphin interfaceEntityGraph<J>- Parameters:
name- name of the attribute- Returns:
- subgraph for the attribute
-
addSubgraph
Description copied from interface:EntityGraphAdd 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:
addSubgraphin interfaceEntityGraph<J>- Parameters:
name- name of the attributetype- entity subclass- Returns:
- subgraph for the attribute
-
addKeySubgraph
Description copied from interface:EntityGraphAdd 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:
addKeySubgraphin interfaceEntityGraph<J>- Parameters:
attribute- attribute- Returns:
- subgraph for the key attribute
-
addKeySubgraph
Description copied from interface:EntityGraphAdd 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:
addKeySubgraphin interfaceEntityGraph<J>- Parameters:
attribute- attributetype- entity subclass- Returns:
- subgraph for the key attribute
-
addKeySubgraph
Description copied from interface:EntityGraphAdd 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:
addKeySubgraphin interfaceEntityGraph<J>- Parameters:
name- name of the attribute- Returns:
- subgraph for the key attribute
-
addKeySubgraph
Description copied from interface:EntityGraphAdd 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:
addKeySubgraphin interfaceEntityGraph<J>- Parameters:
name- name of the attributetype- entity subclass- Returns:
- subgraph for the key attribute
-