Top Description Fields Constructors Methods
org.hibernate.graph.internal

public abstract Class AbstractGraph<J>

extends AbstractGraphNode<J>
implements GraphImplementor<J>
Class Inheritance
All Implemented Interfaces
org.hibernate.graph.spi.GraphImplementor, org.hibernate.graph.spi.GraphNodeImplementor, org.hibernate.graph.GraphNode, org.hibernate.graph.Graph
Known Direct Subclasses
org.hibernate.graph.internal.RootGraphImpl, org.hibernate.graph.internal.SubGraphImpl
Imports
java.util.ArrayList, .HashMap, .List, .Map, java.util.concurrent.ConcurrentHashMap, org.hibernate.graph.AttributeNode, .CannotBecomeEntityGraphException, .CannotContainSubGraphException, .RootGraph, .SubGraph, org.hibernate.graph.spi.AttributeNodeImplementor, .GraphImplementor, .RootGraphImplementor, org.hibernate.metamodel.model.domain.EntityDomainType, .ManagedDomainType, .PersistentAttribute

Base class for RootGraph and SubGraph implementations.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private Map<PersistentAttribute<?, ?>, AttributeNodeImplementor<?>>
private final ManagedDomainType<J>

Constructor Summary

AccessConstructor and Description
public
AbstractGraph(ManagedDomainType<J> managedType, boolean mutable)

protected
AbstractGraph(GraphImplementor<J> original, boolean mutable)

Method Summary

Modifier and TypeMethod and Description
public AttributeNodeImplementor<?>
public <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(String attributeName)

Implements org.hibernate.graph.spi.GraphImplementor.addAttributeNode.

Add an AttributeNode (with no associated SubGraph) to this container by attribute name.
public <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(PersistentAttribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.spi.GraphImplementor.addAttributeNode.

Add an AttributeNode (with no associated SubGraph) to this container by attribute reference.
public <AJ> AttributeNodeImplementor<AJ>
findAttributeNode(String attributeName)

Implements org.hibernate.graph.spi.GraphImplementor.findAttributeNode.

Find an already existing AttributeNode by attributeName within this container
public <AJ> AttributeNodeImplementor<AJ>
findAttributeNode(PersistentAttribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.spi.GraphImplementor.findAttributeNode.

Find an already existing AttributeNode by corresponding attribute reference, within this container.
public <AJ> AttributeNodeImplementor<AJ>
public List<AttributeNodeImplementor<?>>
public List<AttributeNode<?>>
public ManagedDomainType<J>
public RootGraphImplementor<J>
makeRootGraph(String name, boolean
controls whether the resulting Graph is mutable
mutable
)

Implements org.hibernate.graph.spi.GraphImplementor.makeRootGraph.

Create a named root Graph if the given name is not null.
public void
Inherited from org.hibernate.graph.internal.AbstractGraphNode:
isMutableverifyMutability

Field Detail

attrNodeMapback to summary
private Map<PersistentAttribute<?, ?>, AttributeNodeImplementor<?>> attrNodeMap
managedTypeback to summary
private final ManagedDomainType<J> managedType

Constructor Detail

AbstractGraphback to summary
public AbstractGraph(ManagedDomainType<J> managedType, boolean mutable)
AbstractGraphback to summary
protected AbstractGraph(GraphImplementor<J> original, boolean mutable)

Method Detail

addAttributeNodeback to summary
public AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> incomingAttributeNode)

Implements org.hibernate.graph.spi.GraphImplementor.addAttributeNode.

Annotations
@Override
addAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException

Implements org.hibernate.graph.spi.GraphImplementor.addAttributeNode.

Doc from org.hibernate.graph.Graph.addAttributeNode.

Add an AttributeNode (with no associated SubGraph) to this container by attribute name.

Annotations
@Override
addAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(PersistentAttribute<? extends J, AJ> attribute) throws CannotContainSubGraphException

Implements org.hibernate.graph.spi.GraphImplementor.addAttributeNode.

Doc from org.hibernate.graph.Graph.addAttributeNode.

Add an AttributeNode (with no associated SubGraph) to this container by attribute reference.

Annotations
@Override
findAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(String attributeName)

Implements org.hibernate.graph.spi.GraphImplementor.findAttributeNode.

Doc from org.hibernate.graph.Graph.findAttributeNode.

Find an already existing AttributeNode by attributeName within this container

Annotations
@Override
@SuppressWarnings:unchecked
findAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(PersistentAttribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.spi.GraphImplementor.findAttributeNode.

Doc from org.hibernate.graph.Graph.findAttributeNode.

Find an already existing AttributeNode by corresponding attribute reference, within this container.

Annotations
@Override
@SuppressWarnings:unchecked
findOrCreateAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.spi.GraphImplementor.findOrCreateAttributeNode.

Annotations
@Override
@SuppressWarnings:unchecked
getAttributeNodeImplementorsback to summary
public List<AttributeNodeImplementor<?>> getAttributeNodeImplementors()

Implements org.hibernate.graph.spi.GraphImplementor.getAttributeNodeImplementors.

Annotations
@Override
getGraphAttributeNodesback to summary
public List<AttributeNode<?>> getGraphAttributeNodes()

Implements org.hibernate.graph.Graph.getGraphAttributeNodes.

Doc from org.hibernate.graph.Graph.getGraphAttributeNodes.

Ultimately only needed for implementing jakarta.persistence.EntityGraph#getAttributeNodes() and jakarta.persistence.Subgraph#getAttributeNodes()

Annotations
@Override
@SuppressWarnings:unchecked, rawtypes
getGraphedTypeback to summary
public ManagedDomainType<J> getGraphedType()

Implements org.hibernate.graph.Graph.getGraphedType.

Doc from org.hibernate.graph.Graph.getGraphedType.

Graphs apply only to jakarta.persistence.metamodel.ManagedTypes.

Returns:ManagedDomainType<J>

the ManagedType being graphed here.

Annotations
@Override
makeRootGraphback to summary
public RootGraphImplementor<J> makeRootGraph(String name, boolean mutable)

Implements org.hibernate.graph.spi.GraphImplementor.makeRootGraph.

Doc from org.hibernate.graph.Graph.makeRootGraph.

Create a named root Graph if the given name is not null.

Parameters
mutable:boolean

controls whether the resulting Graph is mutable

Annotations
@Override
mergeback to summary
public void merge(GraphImplementor<? extends J> other)

Implements org.hibernate.graph.spi.GraphImplementor.merge.

Annotations
@Override
@SuppressWarnings:unchecked