Package org.hibernate.graph.spi
Interface GraphImplementor<J>
- All Superinterfaces:
Graph<J>
,Graph<J>
,GraphNode<J>
,GraphNodeImplementor<J>
- All Known Subinterfaces:
RootGraphImplementor<J>
,SubGraphImplementor<J>
- All Known Implementing Classes:
AbstractGraph
,RootGraphImpl
,SubGraphImpl
Integration version of the
Graph
contract-
Method Summary
Modifier and TypeMethodDescription<Y> AttributeNodeImplementor<Y>
addAttributeNode
(Attribute<? super J, Y> attribute) <AJ> AttributeNodeImplementor<AJ>
addAttributeNode
(String attributeName) addAttributeNode
(AttributeNodeImplementor<?> makeCopy) <AJ> AttributeNodeImplementor<AJ>
addAttributeNode
(PersistentAttribute<? super J, AJ> attribute) Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute reference.default <AJ> SubGraphImplementor<AJ>
addKeySubGraph
(String attributeName) default <AJ> SubGraphImplementor<AJ>
addKeySubGraph
(String attributeName, Class<AJ> subtype) default <AJ> SubGraphImplementor<AJ>
addKeySubGraph
(PersistentAttribute<? super J, AJ> attribute) default <AJ> SubGraphImplementor<? extends AJ>
addKeySubGraph
(PersistentAttribute<? super J, AJ> attribute, Class<? extends AJ> subType) default <AJ> SubGraphImplementor<AJ>
addSubGraph
(String attributeName) Create and return a new (mutable)SubGraph
associated with the namedAttributeNode
.default <AJ> SubGraphImplementor<AJ>
addSubGraph
(String attributeName, Class<AJ> subType) default <AJ> SubGraphImplementor<AJ>
addSubGraph
(PersistentAttribute<? super J, AJ> attribute) Create and return a new (mutable)SubGraph
associated with theAttributeNode
for the given attribute.default <AJ> SubGraphImplementor<? extends AJ>
addSubGraph
(PersistentAttribute<? super J, AJ> attribute, Class<? extends AJ> subType) <AJ> AttributeNodeImplementor<AJ>
findAttributeNode
(String attributeName) Find an already existing AttributeNode by attributeName within this container<AJ> AttributeNodeImplementor<AJ>
findAttributeNode
(PersistentAttribute<? super J, AJ> attribute) Find an already existing AttributeNode by corresponding attribute reference, within this container.default <AJ> AttributeNodeImplementor<AJ>
<AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode
(PersistentAttribute<? super J, AJ> attribute) default List<AttributeNode<?>>
Get a list of all existing AttributeNodes within this container.default boolean
hasAttributeNode
(Attribute<? super J, ?> attribute) default boolean
hasAttributeNode
(String attributeName) makeCopy
(boolean mutable) makeRootGraph
(String name, boolean mutable) Create a named rootGraph
if the given name is not null.makeSubGraph
(boolean mutable) void
merge
(GraphImplementor<? extends J> other) default void
visitAttributeNodes
(Consumer<AttributeNodeImplementor<?>> consumer) Methods inherited from interface jakarta.persistence.Graph
addAttributeNodes, addAttributeNodes, addElementSubgraph, addElementSubgraph, addElementSubgraph, addKeySubgraph, addKeySubgraph, addKeySubgraph, addKeySubgraph, addMapKeySubgraph, addSubgraph, addSubgraph, addSubgraph, addSubgraph, getAttributeNode, getAttributeNode, getAttributeNodes, removeAttributeNode, removeAttributeNode, removeAttributeNodes
Methods inherited from interface org.hibernate.graph.Graph
addPluralSubgraph, addTreatedElementSubgraph, addTreatedMapKeySubgraph, addTreatedSubgraph, getGraphAttributeNodes, getGraphedType
-
Method Details
-
merge
-
makeRootGraph
RootGraphImplementor<J> makeRootGraph(String name, boolean mutable) throws CannotBecomeEntityGraphException Description copied from interface:Graph
Create a named rootGraph
if the given name is not null.- Specified by:
makeRootGraph
in interfaceGraph<J>
mutable
- controls whether the resultingGraph
is mutable- Throws:
CannotBecomeEntityGraphException
- If the named attribute is not entity-valued
-
makeSubGraph
Description copied from interface:Graph
- Specified by:
makeSubGraph
in interfaceGraph<J>
-
makeCopy
-
visitAttributeNodes
-
hasAttributeNode
- Specified by:
hasAttributeNode
in interfaceGraph<J>
-
hasAttributeNode
- Specified by:
hasAttributeNode
in interfaceGraph<J>
-
addAttributeNode
-
getAttributeNodeImplementors
List<AttributeNodeImplementor<?>> getAttributeNodeImplementors() -
getAttributeNodeList
Description copied from interface:Graph
Get a list of all existing AttributeNodes within this container.- Specified by:
getAttributeNodeList
in interfaceGraph<J>
-
findAttributeNode
Description copied from interface:Graph
Find an already existing AttributeNode by attributeName within this container- Specified by:
findAttributeNode
in interfaceGraph<J>
-
findAttributeNode
Description copied from interface:Graph
Find an already existing AttributeNode by corresponding attribute reference, within this container.- Specified by:
findAttributeNode
in interfaceGraph<J>
-
addAttributeNode
<AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException - Specified by:
addAttributeNode
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addAttributeNode
- Specified by:
addAttributeNode
in interfaceGraph<J>
-
addAttributeNode
<AJ> AttributeNodeImplementor<AJ> addAttributeNode(PersistentAttribute<? super J, AJ> attribute) throws CannotContainSubGraphExceptionDescription copied from interface:Graph
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute reference.- Specified by:
addAttributeNode
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
findOrCreateAttributeNode
-
findOrCreateAttributeNode
<AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttribute<? super J, AJ> attribute) -
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName) throws CannotContainSubGraphException Description copied from interface:Graph
Create and return a new (mutable)SubGraph
associated with the namedAttributeNode
.- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName, Class<AJ> subType) throws CannotContainSubGraphException - Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttribute<? super J, AJ> attribute) throws CannotContainSubGraphExceptionDescription copied from interface:Graph
Create and return a new (mutable)SubGraph
associated with theAttributeNode
for the given attribute.- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addSubGraph
default <AJ> SubGraphImplementor<? extends AJ> addSubGraph(PersistentAttribute<? super J, AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException- Specified by:
addSubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-
addKeySubGraph
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
- Specified by:
addKeySubGraph
in interfaceGraph<J>
-
addKeySubGraph
default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(PersistentAttribute<? super J, AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException- Specified by:
addKeySubGraph
in interfaceGraph<J>
- Throws:
CannotContainSubGraphException
-