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 protectedAbstractGraph(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 toManagedTypes.RootGraphImplementor<J>makeRootGraph(String name, boolean mutable)Create a named rootGraphif the given name is not null.voidmerge(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:GraphGraphs apply only toManagedTypes.- Specified by:
getGraphedTypein interfaceGraph<J>- Returns:
- the
ManagedTypebeing graphed here.
-
makeRootGraph
public RootGraphImplementor<J> makeRootGraph(String name, boolean mutable)
Description copied from interface:GraphCreate a named rootGraphif the given name is not null.- Specified by:
makeRootGraphin interfaceGraph<J>- Specified by:
makeRootGraphin interfaceGraphImplementor<J>mutable- controls whether the resultingGraphis mutable
-
merge
public void merge(GraphImplementor<? extends J> other)
- Specified by:
mergein interfaceGraphImplementor<J>
-
addAttributeNode
public AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> incomingAttributeNode)
- Specified by:
addAttributeNodein interfaceGraphImplementor<J>
-
findAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(String attributeName)
Description copied from interface:GraphFind an already existing AttributeNode by attributeName within this container- Specified by:
findAttributeNodein interfaceGraph<J>- Specified by:
findAttributeNodein interfaceGraphImplementor<J>
-
findAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
Description copied from interface:GraphFind an already existing AttributeNode by corresponding attribute reference, within this container.- Specified by:
findAttributeNodein interfaceGraph<J>- Specified by:
findAttributeNodein interfaceGraphImplementor<J>
-
getGraphAttributeNodes
public List<AttributeNode<?>> getGraphAttributeNodes()
Description copied from interface:GraphUltimately only needed for implementingEntityGraph.getAttributeNodes()andSubgraph.getAttributeNodes()- Specified by:
getGraphAttributeNodesin interfaceGraph<J>
-
getAttributeNodeImplementors
public List<AttributeNodeImplementor<?>> getAttributeNodeImplementors()
- Specified by:
getAttributeNodeImplementorsin interfaceGraphImplementor<J>
-
addAttributeNode
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException
Description copied from interface:GraphAdd anAttributeNode(with no associatedSubGraph) to this container by attribute name.- Specified by:
addAttributeNodein interfaceGraph<J>- Specified by:
addAttributeNodein interfaceGraphImplementor<J>- Throws:
CannotContainSubGraphException
-
addAttributeNode
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(PersistentAttribute<? extends J,AJ> attribute) throws CannotContainSubGraphException
Description copied from interface:GraphAdd anAttributeNode(with no associatedSubGraph) to this container by attribute reference.- Specified by:
addAttributeNodein interfaceGraph<J>- Specified by:
addAttributeNodein interfaceGraphImplementor<J>- Throws:
CannotContainSubGraphException
-
findOrCreateAttributeNode
public <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttribute<? extends J,AJ> attribute)
- Specified by:
findOrCreateAttributeNodein interfaceGraphImplementor<J>
-
-