Package org.hibernate.query.sqm.internal
Class SqmJdbcExecutionContextAdapter
- java.lang.Object
-
- org.hibernate.query.sqm.internal.SqmJdbcExecutionContextAdapter
-
- All Implemented Interfaces:
ExecutionContext
public class SqmJdbcExecutionContextAdapter extends Object implements ExecutionContext
ExecutionContext adapter delegating to a DomainQueryExecutionContext
-
-
Constructor Summary
Constructors Constructor Description SqmJdbcExecutionContextAdapter(DomainQueryExecutionContext sqmExecutionContext, JdbcSelect jdbcSelect)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Callback
getCallback()
String
getQueryIdentifier(String sql)
QueryOptions
getQueryOptions()
QueryParameterBindings
getQueryParameterBindings()
SharedSessionContractImplementor
getSession()
boolean
hasQueryExecutionToBeAddedToStatistics()
Determine if the query execution has to be considered by theStatistics
.static SqmJdbcExecutionContextAdapter
omittingLockingAndPaging(DomainQueryExecutionContext sqmExecutionContext)
Creates an adapter which drops any locking or paging details from the query optionsstatic SqmJdbcExecutionContextAdapter
usingLockingAndPaging(DomainQueryExecutionContext sqmExecutionContext)
Creates an adapter which honors any locking or paging details specified in the query options-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.exec.spi.ExecutionContext
afterStatement, getCollectionKey, getEntityId, getEntityInstance, getLoadQueryInfluencers, isScrollResult, registerLoadingEntityEntry
-
-
-
-
Constructor Detail
-
SqmJdbcExecutionContextAdapter
public SqmJdbcExecutionContextAdapter(DomainQueryExecutionContext sqmExecutionContext, JdbcSelect jdbcSelect)
-
-
Method Detail
-
omittingLockingAndPaging
public static SqmJdbcExecutionContextAdapter omittingLockingAndPaging(DomainQueryExecutionContext sqmExecutionContext)
Creates an adapter which drops any locking or paging details from the query options
-
usingLockingAndPaging
public static SqmJdbcExecutionContextAdapter usingLockingAndPaging(DomainQueryExecutionContext sqmExecutionContext)
Creates an adapter which honors any locking or paging details specified in the query options
-
getSession
public SharedSessionContractImplementor getSession()
- Specified by:
getSession
in interfaceExecutionContext
-
getQueryOptions
public QueryOptions getQueryOptions()
- Specified by:
getQueryOptions
in interfaceExecutionContext
-
getQueryParameterBindings
public QueryParameterBindings getQueryParameterBindings()
- Specified by:
getQueryParameterBindings
in interfaceExecutionContext
-
getCallback
public Callback getCallback()
- Specified by:
getCallback
in interfaceExecutionContext
-
hasQueryExecutionToBeAddedToStatistics
public boolean hasQueryExecutionToBeAddedToStatistics()
Description copied from interface:ExecutionContext
Determine if the query execution has to be considered by theStatistics
.- Specified by:
hasQueryExecutionToBeAddedToStatistics
in interfaceExecutionContext
- Returns:
- true if the query execution has to be added to the
Statistics
, false otherwise.
-
getQueryIdentifier
public String getQueryIdentifier(String sql)
- Specified by:
getQueryIdentifier
in interfaceExecutionContext
-
-