Package org.hibernate.graph
Interface SubGraph<J>
- All Known Subinterfaces:
SubGraphImplementor<J>
- All Known Implementing Classes:
SubGraphImpl
Extends the JPA-defined
Subgraph with additional operations.- Author:
- Steve Ebersole, Andrea Boriero
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddAttributeNodes(Attribute<J, ?>... attribute) 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.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 corresponding to the attributes of this managed type that are included in the subgraph.Return the type for which this subgraph was defined.Methods inherited from interface org.hibernate.graph.Graph
addAttributeNode, addAttributeNode, addKeySubGraph, addKeySubGraph, addKeySubGraph, addKeySubGraph, addPluralSubgraph, addSubGraph, addSubGraph, addSubGraph, addSubGraph, findAttributeNode, findAttributeNode, getAttributeNodeList, getGraphAttributeNodes, getGraphedType, makeCopy, makeRootGraph, makeSubGraph
-
Method Details
-
getAttributeNodes
Description copied from interface:SubgraphReturn the attribute nodes corresponding to the attributes of this managed type that are included in the subgraph.- Specified by:
getAttributeNodesin interfaceSubgraph<J>- Returns:
- list of attribute nodes included in the subgraph or empty List if none have been defined
-
addAttributeNodes
Description copied from interface:SubgraphAdd one or more attribute nodes to the entity graph.- Specified by:
addAttributeNodesin interfaceSubgraph<J>- Parameters:
names- name of the attribute
-
addAttributeNodes
Description copied from interface:SubgraphAdd one or more attribute nodes to the entity graph.- Specified by:
addAttributeNodesin interfaceSubgraph<J>- Parameters:
attribute- attribute
-
addSubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
attribute- attribute- Returns:
- subgraph for the attribute
-
addSubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
attribute- attributetype- entity subclass- Returns:
- subgraph for the attribute
-
addSubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
name- name of the attribute- Returns:
- subgraph for the attribute
-
addSubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
name- name of the attributetype- entity subclass- Returns:
- subgraph for the attribute
-
addKeySubgraph
Description copied from interface:SubgraphAdd a node to the graph that corresponds to a map key that is a managed type. This allows for construction of multinode entity graphs that include related managed types.- Specified by:
addKeySubgraphin interfaceSubgraph<J>- Parameters:
attribute- attribute- Returns:
- subgraph for the key attribute
-
addKeySubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
attribute- attributetype- entity subclass- Returns:
- subgraph for the attribute
-
addKeySubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
name- name of the attribute- Returns:
- subgraph for the key attribute
-
addKeySubgraph
Description copied from interface:SubgraphAdd 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 interfaceSubgraph<J>- Parameters:
name- name of the attributetype- entity subclass- Returns:
- subgraph for the attribute
-
getClassType
Description copied from interface:SubgraphReturn the type for which this subgraph was defined.- Specified by:
getClassTypein interfaceSubgraph<J>- Returns:
- managed type referenced by the subgraph
-