Top Description Methods
org.hibernate.graph.spi

public Interface GraphImplementor<J>

extends Graph<J>, GraphNodeImplementor<J>
Known Direct Subinterfaces
org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.graph.spi.SubGraphImplementor
Known Direct Implementers
org.hibernate.graph.internal.AbstractGraph
Imports
java.util.List, java.util.function.Consumer, javax.persistence.metamodel.Attribute, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.graph.AttributeNode, .CannotBecomeEntityGraphException, .CannotContainSubGraphException, .Graph, .SubGraph, org.hibernate.metamodel.model.domain.spi.PersistentAttributeDescriptor, .ManagedTypeDescriptor

Integration version of the Graph contract
Authors
Strong Liu, Steve Ebersole, Andrea Boriero

Method Summary

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

Redeclares org.hibernate.graph.Graph.addAttributeNode.

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

public default <AJ> AttributeNodeImplementor<AJ>
addAttributeNode(Attribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.Graph.addAttributeNode.

Add an AttributeNode (with no associated SubGraphNode) to this container by Attribute reference
public default <AJ> SubGraphImplementor<AJ>
public default <AJ> SubGraphImplementor<AJ>
public default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute)

public default <AJ> SubGraphImplementor<AJ>
addKeySubGraph(Attribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.Graph.addKeySubGraph.

public default <AJ> SubGraphImplementor<? extends AJ>
addKeySubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute, Class<? extends AJ> subType)

public default <AJ> SubGraphImplementor<? extends AJ>
addKeySubGraph(Attribute<? extends J, AJ> attribute, Class<? extends AJ> subType)

Implements org.hibernate.graph.Graph.addKeySubGraph.

public default <AJ> SubGraphImplementor<AJ>
addSubGraph(String attributeName)

Implements org.hibernate.graph.Graph.addSubGraph.

Create a (mutable) SubGraphNode associated with the named AttributeNode.
public default <AJ> SubGraphImplementor<AJ>
addSubGraph(String attributeName, Class<AJ> subType)

Implements org.hibernate.graph.Graph.addSubGraph.

public default <AJ> SubGraphImplementor<AJ>
addSubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute)

public default <AJ> SubGraphImplementor<AJ>
addSubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute, Class<AJ> subType)

public default <AJ> SubGraphImplementor<AJ>
addSubGraph(Attribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.Graph.addSubGraph.

Create a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute.
public default <AJ> SubGraph<? extends AJ>
addSubGraph(Attribute<? extends J, AJ> attribute, Class<? extends AJ> type)

Implements org.hibernate.graph.Graph.addSubGraph.

public boolean
appliesTo(ManagedTypeDescriptor<? super J> managedType)

public boolean
appliesTo(Class<? super J> javaType)

public <AJ> AttributeNodeImplementor<AJ>
findAttributeNode(String attributeName)

Redeclares org.hibernate.graph.Graph.findAttributeNode.

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

Implements org.hibernate.graph.Graph.findAttributeNode.

Find an already existing AttributeNode by corresponding attribute reference, within this container
public default <AJ> AttributeNodeImplementor<AJ>
public <AJ> AttributeNodeImplementor<AJ>
public List<AttributeNodeImplementor<?>>
public default List<AttributeNode<?>>
getAttributeNodeList()

Implements org.hibernate.graph.Graph.getAttributeNodeList.

Get a list of all existing AttributeNodes within this container
public ManagedTypeDescriptor<J>
getGraphedType()

Redeclares org.hibernate.graph.Graph.getGraphedType.

Graphs apply only to ManagedTypes.
public GraphImplementor<J>
public RootGraphImplementor<J>
makeRootGraph(String name, boolean mutable)

Redeclares org.hibernate.graph.Graph.makeRootGraph.

Create a named (if passed `name` != null) root Graph.
public SubGraphImplementor<J>
makeSubGraph(boolean mutable)

Redeclares org.hibernate.graph.Graph.makeSubGraph.

Create a (mutable/immutable) SubGraph based on this Graph
public void
merge(GraphImplementor<J>... others)

public SessionFactoryImplementor
sessionFactory()

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public default void
Inherited from org.hibernate.graph.Graph:
getGraphAttributeNodes

Method Detail

addAttributeNodeback to summary
public AttributeNodeImplementor<?> addAttributeNode(AttributeNodeImplementor<?> makeCopy)
addAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> addAttributeNode(String attributeName) throws CannotContainSubGraphException

Redeclares org.hibernate.graph.Graph.addAttributeNode.

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

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

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

Implements org.hibernate.graph.Graph.addAttributeNode.

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

Add an AttributeNode (with no associated SubGraphNode) to this container by Attribute reference

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName)

Implements org.hibernate.graph.Graph.addKeySubGraph.

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addKeySubGraph(String attributeName, Class<AJ> subtype)

Implements org.hibernate.graph.Graph.addKeySubGraph.

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addKeySubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute)
Annotations
@SuppressWarnings:unchecked
addKeySubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addKeySubGraph(Attribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.Graph.addKeySubGraph.

Annotations
@Override
@SuppressWarnings:unchecked
addKeySubGraphback to summary
public default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException
Annotations
@SuppressWarnings:unchecked
addKeySubGraphback to summary
public default <AJ> SubGraphImplementor<? extends AJ> addKeySubGraph(Attribute<? extends J, AJ> attribute, Class<? extends AJ> subType) throws CannotContainSubGraphException

Implements org.hibernate.graph.Graph.addKeySubGraph.

Annotations
@Override
@SuppressWarnings:unchecked
addSubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName) throws CannotContainSubGraphException

Implements org.hibernate.graph.Graph.addSubGraph.

Doc from org.hibernate.graph.Graph.addSubGraph.

Create a (mutable) SubGraphNode associated with the named AttributeNode. The created SubGraphNode is returned

Annotations
@Override
@SuppressWarnings:unchecked
addSubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addSubGraph(String attributeName, Class<AJ> subType) throws CannotContainSubGraphException

Implements org.hibernate.graph.Graph.addSubGraph.

Annotations
@Override
@SuppressWarnings:unchecked
addSubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute) throws CannotContainSubGraphException
addSubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addSubGraph(PersistentAttributeDescriptor<? extends J, AJ> attribute, Class<AJ> subType) throws CannotContainSubGraphException
addSubGraphback to summary
public default <AJ> SubGraphImplementor<AJ> addSubGraph(Attribute<? extends J, AJ> attribute) throws CannotContainSubGraphException

Implements org.hibernate.graph.Graph.addSubGraph.

Doc from org.hibernate.graph.Graph.addSubGraph.

Create a (mutable) SubGraphNode associated with the AttributeNode for the given Attribute. The created SubGraphNode is returned

Annotations
@Override
@SuppressWarnings:unchecked
addSubGraphback to summary
public default <AJ> SubGraph<? extends AJ> addSubGraph(Attribute<? extends J, AJ> attribute, Class<? extends AJ> type) throws CannotContainSubGraphException

Implements org.hibernate.graph.Graph.addSubGraph.

Annotations
@Override
@SuppressWarnings:unchecked
appliesToback to summary
public boolean appliesTo(ManagedTypeDescriptor<? super J> managedType)
appliesToback to summary
public boolean appliesTo(Class<? super J> javaType)
findAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(String attributeName)

Redeclares org.hibernate.graph.Graph.findAttributeNode.

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

Find an already existing AttributeNode by attributeName within this container

Annotations
@Override
findAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> findAttributeNode(PersistentAttributeDescriptor<? extends J, AJ> attribute)
findAttributeNodeback to summary
public default <AJ> AttributeNodeImplementor<AJ> findAttributeNode(Attribute<? extends J, AJ> attribute)

Implements org.hibernate.graph.Graph.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 default <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(String name)
Annotations
@SuppressWarnings:unchecked
findOrCreateAttributeNodeback to summary
public <AJ> AttributeNodeImplementor<AJ> findOrCreateAttributeNode(PersistentAttributeDescriptor<? extends J, AJ> attribute)
getAttributeNodeImplementorsback to summary
public List<AttributeNodeImplementor<?>> getAttributeNodeImplementors()
getAttributeNodeListback to summary
public default List<AttributeNode<?>> getAttributeNodeList()

Implements org.hibernate.graph.Graph.getAttributeNodeList.

Doc from org.hibernate.graph.Graph.getAttributeNodeList.

Get a list of all existing AttributeNodes within this container

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

Redeclares org.hibernate.graph.Graph.getGraphedType.

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

Graphs apply only to ManagedTypes. Returns the ManagedType being graphed here.

Annotations
@Override
makeCopyback to summary
public GraphImplementor<J> makeCopy(boolean mutable)

Redeclares org.hibernate.graph.Graph.makeCopy, org.hibernate.graph.spi.GraphNodeImplementor.makeCopy.

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

Redeclares org.hibernate.graph.Graph.makeRootGraph.

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

Create a named (if passed `name` != null) root Graph. The `mutable` parameter controls whether the created Graph is mutable.

Annotations
@Override
Exceptions
CannotBecomeEntityGraphException:
For named attributes that are not entity valued
makeSubGraphback to summary
public SubGraphImplementor<J> makeSubGraph(boolean mutable)

Redeclares org.hibernate.graph.Graph.makeSubGraph.

Doc from org.hibernate.graph.Graph.makeSubGraph.

Create a (mutable/immutable) SubGraph based on this Graph

Annotations
@Override
mergeback to summary
public void merge(GraphImplementor<J>... others)
Annotations
@SuppressWarnings:unchecked
sessionFactoryback to summary
public SessionFactoryImplementor sessionFactory()

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

visitAttributeNodesback to summary
public default void visitAttributeNodes(Consumer<AttributeNodeImplementor<?>> consumer)