Package org.hibernate.graph.internal
Class AbstractGraph<J>
java.lang.Object
org.hibernate.graph.internal.AbstractGraphNode<J>
org.hibernate.graph.internal.AbstractGraph<J>
- All Implemented Interfaces:
Graph<J>
,Graph<J>
,GraphNode<J>
,GraphImplementor<J>
,GraphNodeImplementor<J>
- Direct Known Subclasses:
RootGraphImpl
,SubGraphImpl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractGraph
(GraphImplementor<J> original, boolean mutable) AbstractGraph
(ManagedDomainType<J> managedType, boolean mutable) -
Method Summary
Modifier and TypeMethodDescription<Y> AttributeNodeImplementor<Y>
addAttributeNode
(Attribute<? super J, Y> attribute) <AJ> AttributeNodeImplementor<AJ>
addAttributeNode
(String attributeName) addAttributeNode
(AttributeNodeImplementor<?> incomingAttributeNode) <AJ> AttributeNodeImplementor<AJ>
addAttributeNode
(PersistentAttribute<? super J, AJ> attribute) Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute reference.final void
addAttributeNodes
(Attribute<? super J, ?>... attributes) void
addAttributeNodes
(String... attributeNames) <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.<AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode
(PersistentAttribute<? super J, AJ> attribute) <Y> AttributeNodeImplementor<Y>
getAttributeNode
(Attribute<? super J, Y> attribute) <Y> AttributeNodeImplementor<Y>
getAttributeNode
(String attributeName) List<AttributeNode<?>>
Get a list of all existing AttributeNodes within this container.List<AttributeNode<?>>
Ultimately only needed for implementingGraph.getAttributeNodes()
andGraph.getAttributeNodes()
Graphs apply only toManagedType
s.makeRootGraph
(String name, boolean mutable) Create a named rootGraph
if the given name is not null.void
merge
(GraphImplementor<? extends J> other) void
removeAttributeNode
(Attribute<? super J, ?> attribute) void
removeAttributeNode
(String attributeName) void
void
visitAttributeNodes
(Consumer<AttributeNodeImplementor<?>> consumer) Methods inherited from class org.hibernate.graph.internal.AbstractGraphNode
isMutable, verifyMutability
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.persistence.Graph
addElementSubgraph, addElementSubgraph, addElementSubgraph, addKeySubgraph, addKeySubgraph, addKeySubgraph, addKeySubgraph, addMapKeySubgraph, addSubgraph, addSubgraph, addSubgraph, addSubgraph, getAttributeNodes
Methods inherited from interface org.hibernate.graph.Graph
addPluralSubgraph, addTreatedElementSubgraph, addTreatedMapKeySubgraph, addTreatedSubgraph
Methods inherited from interface org.hibernate.graph.spi.GraphImplementor
addKeySubGraph, addKeySubGraph, addKeySubGraph, addKeySubGraph, addSubGraph, addSubGraph, addSubGraph, addSubGraph, findOrCreateAttributeNode, hasAttributeNode, hasAttributeNode, makeCopy, makeSubGraph
Methods inherited from interface org.hibernate.graph.spi.GraphNodeImplementor
makeCopy
-
Constructor Details
-
AbstractGraph
-
AbstractGraph
-
-
Method Details
-
getGraphedType
Description copied from interface:Graph
Graphs apply only toManagedType
s.- Specified by:
getGraphedType
in interfaceGraph<J>
- Returns:
- the
ManagedType
being graphed here.
-
makeRootGraph
Description copied from interface:Graph
Create a named rootGraph
if the given name is not null.- Specified by:
makeRootGraph
in interfaceGraph<J>
- Specified by:
makeRootGraph
in interfaceGraphImplementor<J>
mutable
- controls whether the resultingGraph
is mutable
-
merge
- Specified by:
merge
in interfaceGraphImplementor<J>
-
getAttributeNode
- Specified by:
getAttributeNode
in interfaceGraph<J>
-
getAttributeNode
- Specified by:
getAttributeNode
in interfaceGraph<J>
-
visitAttributeNodes
- Specified by:
visitAttributeNodes
in interfaceGraphImplementor<J>
-
getAttributeNodeList
Description copied from interface:Graph
Get a list of all existing AttributeNodes within this container.- Specified by:
getAttributeNodeList
in interfaceGraph<J>
- Specified by:
getAttributeNodeList
in interfaceGraphImplementor<J>
-
addAttributeNode
public AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> incomingAttributeNode) - Specified by:
addAttributeNode
in interfaceGraphImplementor<J>
-
findAttributeNode
Description copied from interface:Graph
Find an already existing AttributeNode by attributeName within this container- Specified by:
findAttributeNode
in interfaceGraph<J>
- Specified by:
findAttributeNode
in interfaceGraphImplementor<J>
-
findAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(PersistentAttribute<? super J, AJ> attribute) Description copied from interface:Graph
Find an already existing AttributeNode by corresponding attribute reference, within this container.- Specified by:
findAttributeNode
in interfaceGraph<J>
- Specified by:
findAttributeNode
in interfaceGraphImplementor<J>
-
getGraphAttributeNodes
Description copied from interface:Graph
Ultimately only needed for implementingGraph.getAttributeNodes()
andGraph.getAttributeNodes()
- Specified by:
getGraphAttributeNodes
in interfaceGraph<J>
-
getAttributeNodeImplementors
- Specified by:
getAttributeNodeImplementors
in interfaceGraphImplementor<J>
-
addAttributeNode
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException - Specified by:
addAttributeNode
in interfaceGraph<J>
- Specified by:
addAttributeNode
in interfaceGraphImplementor<J>
- Throws:
CannotContainSubGraphException
-
addAttributeNode
public <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>
- Specified by:
addAttributeNode
in interfaceGraphImplementor<J>
- Throws:
CannotContainSubGraphException
-
addAttributeNode
- Specified by:
addAttributeNode
in interfaceGraph<J>
- Specified by:
addAttributeNode
in interfaceGraphImplementor<J>
-
addAttributeNodes
- Specified by:
addAttributeNodes
in interfaceGraph<J>
-
addAttributeNodes
- Specified by:
addAttributeNodes
in interfaceGraph<J>
-
removeAttributeNode
- Specified by:
removeAttributeNode
in interfaceGraph<J>
-
removeAttributeNode
- Specified by:
removeAttributeNode
in interfaceGraph<J>
-
removeAttributeNodes
- Specified by:
removeAttributeNodes
in interfaceGraph<J>
-
findOrCreateAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttribute<? super J, AJ> attribute) - Specified by:
findOrCreateAttributeNode
in interfaceGraphImplementor<J>
-