Top Description Fields Constructors Methods
org.hibernate.engine.spi

public Class EffectiveEntityGraph

extends Object
implements AppliedGraph, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.graph.spi.AppliedGraph
Imports
java.io.Serializable, java.util.Map, org.hibernate.Incubating, org.hibernate.graph.GraphSemantic, org.hibernate.graph.spi.AppliedGraph, .RootGraphImplementor, org.jboss.logging.Logger

Think of this as the composite modeling of a graph and the semantic. Its graph and semantic can be obtained by getGraph() and getSemantic() They can be managed by calls to applyGraph, applyConfiguredGraph and clear
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final boolean
private RootGraphImplementor<?>
private static final Logger
private GraphSemantic

Constructor Summary

AccessConstructor and Description
public
public
EffectiveEntityGraph(boolean allowOverwrite)

Method Summary

Modifier and TypeMethod and Description
public void
applyConfiguredGraph(Map<String, ?> properties)

Apply a graph and semantic based on configuration properties or hints based on GraphSemantic#getJpaHintName() for GraphSemantic#LOAD or GraphSemantic#FETCH.

public void
applyGraph(RootGraphImplementor<?> graph, GraphSemantic semantic)

Apply the graph and semantic.

public void
public RootGraphImplementor<?>
public GraphSemantic
getSemantic()

Implements org.hibernate.graph.spi.AppliedGraph.getSemantic.

The semantic (fetch/load) under which the graph should be applied
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowOverwriteback to summary
private final boolean allowOverwrite
graphback to summary
private RootGraphImplementor<?> graph
logback to summary
private static final Logger log
semanticback to summary
private GraphSemantic semantic

Constructor Detail

EffectiveEntityGraphback to summary
public EffectiveEntityGraph()

Implementation Specification

I explicitly made this constructor package protected because we may need to pass in the SessionFactory or JpaCompliance etc to be able to know what to do in applyConfiguredGraph(Map) when the incoming properties contain both a GraphSemantic#FETCH and a GraphSemantic#LOAD. In other words, we may need to add some constructor argument here so we want to control what can call it

Annotations
@Incubating
EffectiveEntityGraphback to summary
public EffectiveEntityGraph(boolean allowOverwrite)

Implementation Specification

See EffectiveEntityGraph

Annotations
@Incubating
@SuppressWarnings:WeakerAccess

Method Detail

applyConfiguredGraphback to summary
public void applyConfiguredGraph(Map<String, ?> properties)

Apply a graph and semantic based on configuration properties or hints based on GraphSemantic#getJpaHintName() for GraphSemantic#LOAD or GraphSemantic#FETCH. The semantic is required. The graph may be null, but that should generally be considered mis-use.

Exceptions
IllegalArgumentException:
If both kinds of graphs were present in the properties/hints
IllegalStateException:
If previous state is still available (hasn't been cleared).
applyGraphback to summary
public void applyGraph(RootGraphImplementor<?> graph, GraphSemantic semantic)

Apply the graph and semantic. The semantic is required. The graph may be null, but that should generally be considered mis-use.

Exceptions
IllegalArgumentException:
Thrown if the semantic is null
IllegalStateException:
If previous state is still available (hasn't been cleared).
clearback to summary
public void clear()
getGraphback to summary
public RootGraphImplementor<?> getGraph()

Implements org.hibernate.graph.spi.AppliedGraph.getGraph.

Doc from org.hibernate.graph.spi.AppliedGraph.getGraph.

The applied graph

Annotations
@Override
getSemanticback to summary
public GraphSemantic getSemantic()

Implements org.hibernate.graph.spi.AppliedGraph.getSemantic.

Doc from org.hibernate.graph.spi.AppliedGraph.getSemantic.

The semantic (fetch/load) under which the graph should be applied

Annotations
@Override
verifyWriteabilityback to summary
private void verifyWriteability()