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

public Class EntityGraphQueryHint

extends Object
implements AppliedGraph
Class Inheritance
All Implemented Interfaces
org.hibernate.graph.spi.AppliedGraph
Imports
java.util.ArrayList, .Collections, .HashMap, .List, .Map, javax.persistence.AttributeNode, .EntityGraph, .Subgraph, org.hibernate.QueryException, org.hibernate.engine.internal.JoinSequence, org.hibernate.graph.GraphSemantic, org.hibernate.graph.spi.AppliedGraph, .RootGraphImplementor, org.hibernate.hql.internal.ast.HqlSqlWalker, org.hibernate.hql.internal.ast.tree.FromClause, .FromElement, .FromElementFactory, .ImpliedFromElement, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.persister.collection.QueryableCollection, org.hibernate.sql.JoinType, org.hibernate.type.CollectionType, .EntityType, .Type, antlr.SemanticException

Encapsulates a JPA EntityGraph provided through a JPQL query hint. Converts the fetches into a list of AST FromElements. The logic is kept here as much as possible in order to make it easy to remove this in the future, once our AST is improved and this "hack" is no longer needed.
Author
Brett Meyer

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
private List<FromElement>
getFromElements(List<E> attributeNodes, FromElement origin, FromClause fromClause, HqlSqlWalker walker, Map<String, FromElement> explicitFetches)

Deprecated as a consequence of FromElement being deprecated.
public RootGraphImplementor<?>
public GraphSemantic
getGraphSemantic()

Deprecated (5.4) Use getSemantic
public String
getHintName()

Deprecated (5.4) Use getSemantic
public EntityGraph<?>
getOriginEntityGraph()

Deprecated (5.4) Use getGraph
public GraphSemantic
getSemantic()

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

The semantic (fetch/load) under which the graph should be applied
public List<FromElement>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

graphback to summary
private final RootGraphImplementor<?> graph
LOGback to summary
private static final CoreMessageLogger LOG
semanticback to summary
private final GraphSemantic semantic

Constructor Detail

EntityGraphQueryHintback to summary
public EntityGraphQueryHint(String hintName, EntityGraph<?> graph)
EntityGraphQueryHintback to summary
public EntityGraphQueryHint(RootGraphImplementor<?> graph, GraphSemantic semantic)

Method Detail

getFromElementsback to summary
private List<FromElement> getFromElements(List<E> attributeNodes, FromElement origin, FromClause fromClause, HqlSqlWalker walker, Map<String, FromElement> explicitFetches)

Deprecated

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

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
getGraphSemanticback to summary
public GraphSemantic getGraphSemantic()

Deprecated

(5.4) Use getSemantic

Annotations
@Deprecated
getHintNameback to summary
public String getHintName()

Deprecated

(5.4) Use getSemantic

Annotations
@Deprecated
getOriginEntityGraphback to summary
public EntityGraph<?> getOriginEntityGraph()

Deprecated

(5.4) Use getGraph

Annotations
@Deprecated
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
toFromElementsback to summary
public List<FromElement> toFromElements(FromClause fromClause, HqlSqlWalker walker)