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>
,GraphNode<J>
,GraphImplementor<J>
,GraphNodeImplementor<J>
- Direct Known Subclasses:
RootGraphImpl
,SubGraphImpl
public abstract class AbstractGraph<J> extends AbstractGraphNode<J> implements GraphImplementor<J>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractGraph(GraphImplementor<J> original, boolean mutable)
AbstractGraph(ManagedDomainType<J> managedType, boolean mutable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(String attributeName)
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute name.AttributeNodeImplementor<?>
addAttributeNode(AttributeNodeImplementor<?> incomingAttributeNode)
<AJ> AttributeNodeImplementor<AJ>
addAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute reference.<AJ> AttributeNodeImplementor<AJ>
findAttributeNode(String attributeName)
Find an already existing AttributeNode by attributeName within this container<AJ> AttributeNodeImplementor<AJ>
findAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Find an already existing AttributeNode by corresponding attribute reference, within this container.<AJ> AttributeNodeImplementor<AJ>
findOrCreateAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
List<AttributeNodeImplementor<?>>
getAttributeNodeImplementors()
List<AttributeNode<?>>
getGraphAttributeNodes()
Ultimately only needed for implementingEntityGraph.getAttributeNodes()
andSubgraph.getAttributeNodes()
ManagedDomainType<J>
getGraphedType()
Graphs apply only toManagedType
s.RootGraphImplementor<J>
makeRootGraph(String name, boolean mutable)
Create a named rootGraph
if the given name is not null.void
merge(GraphImplementor<? extends J> other)
-
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 org.hibernate.graph.Graph
addPluralSubgraph
-
Methods inherited from interface org.hibernate.graph.spi.GraphImplementor
addKeySubGraph, addKeySubGraph, addKeySubGraph, addKeySubGraph, addSubGraph, addSubGraph, addSubGraph, addSubGraph, findOrCreateAttributeNode, getAttributeNodeList, makeCopy, makeSubGraph, visitAttributeNodes
-
Methods inherited from interface org.hibernate.graph.spi.GraphNodeImplementor
makeCopy
-
-
-
-
Constructor Detail
-
AbstractGraph
public AbstractGraph(ManagedDomainType<J> managedType, boolean mutable)
-
AbstractGraph
protected AbstractGraph(GraphImplementor<J> original, boolean mutable)
-
-
Method Detail
-
getGraphedType
public ManagedDomainType<J> getGraphedType()
Description copied from interface:Graph
Graphs apply only toManagedType
s.- Specified by:
getGraphedType
in interfaceGraph<J>
- Returns:
- the
ManagedType
being graphed here.
-
makeRootGraph
public RootGraphImplementor<J> makeRootGraph(String name, boolean mutable)
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
public void merge(GraphImplementor<? extends J> other)
- Specified by:
merge
in interfaceGraphImplementor<J>
-
addAttributeNode
public AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> incomingAttributeNode)
- Specified by:
addAttributeNode
in interfaceGraphImplementor<J>
-
findAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(String attributeName)
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<? extends 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
public List<AttributeNode<?>> getGraphAttributeNodes()
Description copied from interface:Graph
Ultimately only needed for implementingEntityGraph.getAttributeNodes()
andSubgraph.getAttributeNodes()
- Specified by:
getGraphAttributeNodes
in interfaceGraph<J>
-
getAttributeNodeImplementors
public List<AttributeNodeImplementor<?>> getAttributeNodeImplementors()
- Specified by:
getAttributeNodeImplementors
in interfaceGraphImplementor<J>
-
addAttributeNode
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException
Description copied from interface:Graph
Add anAttributeNode
(with no associatedSubGraph
) to this container by attribute name.- Specified by:
addAttributeNode
in interfaceGraph<J>
- Specified by:
addAttributeNode
in interfaceGraphImplementor<J>
- Throws:
CannotContainSubGraphException
-
addAttributeNode
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(PersistentAttribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Description 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
-
findOrCreateAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
- Specified by:
findOrCreateAttributeNode
in interfaceGraphImplementor<J>
-
-