Package org.hibernate.engine.query.spi
Class HQLQueryPlan
- java.lang.Object
-
- org.hibernate.engine.query.spi.HQLQueryPlan
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FilterQueryPlan
public class HQLQueryPlan extends java.lang.Object implements java.io.Serializable
Defines a query execution plan for an HQL query (or filter).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description HQLQueryPlan(java.lang.String hql, boolean shallow, java.util.Map<java.lang.String,Filter> enabledFilters, SessionFactoryImplementor factory)
Constructs a HQLQueryPlanHQLQueryPlan(java.lang.String hql, boolean shallow, java.util.Map<java.lang.String,Filter> enabledFilters, SessionFactoryImplementor factory, EntityGraphQueryHint entityGraphQueryHint)
protected
HQLQueryPlan(java.lang.String hql, java.lang.String collectionRole, boolean shallow, java.util.Map<java.lang.String,Filter> enabledFilters, SessionFactoryImplementor factory, EntityGraphQueryHint entityGraphQueryHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class
getDynamicInstantiationResultType()
java.util.Set
getEnabledFilterNames()
org.hibernate.query.internal.ParameterMetadataImpl
getParameterMetadata()
java.util.Set
getQuerySpaces()
ReturnMetadata
getReturnMetadata()
java.lang.String
getSourceQuery()
java.lang.String[]
getSqlStrings()
QueryTranslator[]
getTranslators()
Access to the underlying translators associated with this queryjava.util.Set
getUtilizedFilterNames()
boolean
isSelect()
boolean
isShallow()
boolean
isUpdate()
int
performExecuteUpdate(QueryParameters queryParameters, SharedSessionContractImplementor session)
Coordinates the efforts to perform an execution across all the included query translators.java.util.Iterator
performIterate(QueryParameters queryParameters, EventSource session)
Coordinates the efforts to perform an iterate across all the included query translators.java.util.List
performList(QueryParameters queryParameters, SharedSessionContractImplementor session)
Coordinates the efforts to perform a list across all the included query translators.ScrollableResultsImplementor
performScroll(QueryParameters queryParameters, SharedSessionContractImplementor session)
Coordinates the efforts to perform a scroll across all the included query translators.
-
-
-
Constructor Detail
-
HQLQueryPlan
public HQLQueryPlan(java.lang.String hql, boolean shallow, java.util.Map<java.lang.String,Filter> enabledFilters, SessionFactoryImplementor factory)
Constructs a HQLQueryPlan- Parameters:
hql
- The HQL queryshallow
- Whether the execution is to be shallow or notenabledFilters
- The enabled filters (we only keep the names)factory
- The factory
-
HQLQueryPlan
public HQLQueryPlan(java.lang.String hql, boolean shallow, java.util.Map<java.lang.String,Filter> enabledFilters, SessionFactoryImplementor factory, EntityGraphQueryHint entityGraphQueryHint)
-
HQLQueryPlan
protected HQLQueryPlan(java.lang.String hql, java.lang.String collectionRole, boolean shallow, java.util.Map<java.lang.String,Filter> enabledFilters, SessionFactoryImplementor factory, EntityGraphQueryHint entityGraphQueryHint)
-
-
Method Detail
-
getSourceQuery
public java.lang.String getSourceQuery()
-
getQuerySpaces
public java.util.Set getQuerySpaces()
-
getParameterMetadata
public org.hibernate.query.internal.ParameterMetadataImpl getParameterMetadata()
-
getReturnMetadata
public ReturnMetadata getReturnMetadata()
-
getEnabledFilterNames
public java.util.Set getEnabledFilterNames()
-
getSqlStrings
public java.lang.String[] getSqlStrings()
-
getUtilizedFilterNames
public java.util.Set getUtilizedFilterNames()
-
isShallow
public boolean isShallow()
-
performList
public java.util.List performList(QueryParameters queryParameters, SharedSessionContractImplementor session) throws HibernateException
Coordinates the efforts to perform a list across all the included query translators.- Parameters:
queryParameters
- The query parameterssession
- The session- Returns:
- The query result list
- Throws:
HibernateException
- Indicates a problem performing the query
-
performIterate
public java.util.Iterator performIterate(QueryParameters queryParameters, EventSource session) throws HibernateException
Coordinates the efforts to perform an iterate across all the included query translators.- Parameters:
queryParameters
- The query parameterssession
- The session- Returns:
- The query result iterator
- Throws:
HibernateException
- Indicates a problem performing the query
-
performScroll
public ScrollableResultsImplementor performScroll(QueryParameters queryParameters, SharedSessionContractImplementor session) throws HibernateException
Coordinates the efforts to perform a scroll across all the included query translators.- Parameters:
queryParameters
- The query parameterssession
- The session- Returns:
- The query result iterator
- Throws:
HibernateException
- Indicates a problem performing the query
-
performExecuteUpdate
public int performExecuteUpdate(QueryParameters queryParameters, SharedSessionContractImplementor session) throws HibernateException
Coordinates the efforts to perform an execution across all the included query translators.- Parameters:
queryParameters
- The query parameterssession
- The session- Returns:
- The aggregated "affected row" count
- Throws:
HibernateException
- Indicates a problem performing the execution
-
getTranslators
public QueryTranslator[] getTranslators()
Access to the underlying translators associated with this query- Returns:
- The translators
-
getDynamicInstantiationResultType
public java.lang.Class getDynamicInstantiationResultType()
-
isSelect
public boolean isSelect()
-
isUpdate
public boolean isUpdate()
-
-