Package org.hibernate.engine.spi
Class EffectiveEntityGraph
- java.lang.Object
-
- org.hibernate.engine.spi.EffectiveEntityGraph
-
- All Implemented Interfaces:
Serializable
,AppliedGraph
public class EffectiveEntityGraph extends Object implements AppliedGraph, Serializable
Think of this as the composite modeling of a graph and the semantic. Its graph and semantic can be obtained bygetGraph()
andgetSemantic()
They can be managed by calls toapplyGraph(org.hibernate.graph.spi.RootGraphImplementor<?>, org.hibernate.graph.GraphSemantic)
,applyConfiguredGraph(java.util.Map<java.lang.String, ?>)
andclear()
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EffectiveEntityGraph()
EffectiveEntityGraph(boolean allowOverwrite)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyConfiguredGraph(Map<String,?> properties)
Apply a graph and semantic based on configuration properties or hints based onGraphSemantic.getJpaHintName()
forGraphSemantic.LOAD
orGraphSemantic.FETCH
.void
applyGraph(RootGraphImplementor<?> graph, GraphSemantic semantic)
Apply the graph and semantic.void
clear()
RootGraphImplementor<?>
getGraph()
The applied graphGraphSemantic
getSemantic()
The semantic (fetch/load) under which the graph should be applied
-
-
-
Method Detail
-
getSemantic
public GraphSemantic getSemantic()
Description copied from interface:AppliedGraph
The semantic (fetch/load) under which the graph should be applied- Specified by:
getSemantic
in interfaceAppliedGraph
-
getGraph
public RootGraphImplementor<?> getGraph()
Description copied from interface:AppliedGraph
The applied graph- Specified by:
getGraph
in interfaceAppliedGraph
-
applyGraph
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.- Throws:
IllegalArgumentException
- Thrown if the semantic is nullIllegalStateException
- If previous state is still available (hasn't been cleared).
-
applyConfiguredGraph
public void applyConfiguredGraph(Map<String,?> properties)
Apply a graph and semantic based on configuration properties or hints based onGraphSemantic.getJpaHintName()
forGraphSemantic.LOAD
orGraphSemantic.FETCH
. The semantic is required. The graph may be null, but that should generally be considered mis-use.- Throws:
IllegalArgumentException
- If both kinds of graphs were present in the properties/hintsIllegalStateException
- If previous state is still available (hasn't been cleared).
-
clear
public void clear()
-
-