Package org.hibernate.engine.spi
Class EffectiveEntityGraph
- java.lang.Object
-
- org.hibernate.engine.spi.EffectiveEntityGraph
-
- All Implemented Interfaces:
java.io.Serializable,AppliedGraph
public class EffectiveEntityGraph extends java.lang.Object implements AppliedGraph, java.io.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 voidapplyConfiguredGraph(java.util.Map<java.lang.String,?> properties)Apply a graph and semantic based on configuration properties or hints based onGraphSemantic.getJpaHintName()forGraphSemantic.LOADorGraphSemantic.FETCH.voidapplyGraph(RootGraphImplementor<?> graph, GraphSemantic semantic)Apply the graph and semantic.voidclear()RootGraphImplementor<?>getGraph()The applied graphGraphSemanticgetSemantic()The semantic (fetch/load) under which the graph should be applied
-
-
-
Method Detail
-
getSemantic
public GraphSemantic getSemantic()
Description copied from interface:AppliedGraphThe semantic (fetch/load) under which the graph should be applied- Specified by:
getSemanticin interfaceAppliedGraph
-
getGraph
public RootGraphImplementor<?> getGraph()
Description copied from interface:AppliedGraphThe applied graph- Specified by:
getGraphin 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:
java.lang.IllegalArgumentException- Thrown if the semantic is nulljava.lang.IllegalStateException- If previous state is still available (hasn't been cleared).
-
applyConfiguredGraph
public void applyConfiguredGraph(java.util.Map<java.lang.String,?> properties)
Apply a graph and semantic based on configuration properties or hints based onGraphSemantic.getJpaHintName()forGraphSemantic.LOADorGraphSemantic.FETCH. The semantic is required. The graph may be null, but that should generally be considered mis-use.- Throws:
java.lang.IllegalArgumentException- If both kinds of graphs were present in the properties/hintsjava.lang.IllegalStateException- If previous state is still available (hasn't been cleared).
-
clear
public void clear()
-
-