public class QueryImpl<X> extends AbstractQueryImpl<X> implements TypedQuery<X>, HibernateQuery, HibernateQuery
Query and TypedQuery contracts.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
QueryImpl.JpaPositionalParameterRegistrationImpl<T>
Specialized handling for JPA "positional parameters". 
 | 
BaseQueryImpl.ParameterBindImpl<T>| Modifier and Type | Field and Description | 
|---|---|
static EntityManagerMessageLogger | 
LOG  | 
| Constructor and Description | 
|---|
QueryImpl(Query query,
         AbstractEntityManagerImpl em)  | 
QueryImpl(Query query,
         AbstractEntityManagerImpl em,
         Map<String,Class> namedParameterTypeRedefinitions)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
applyAliasSpecificLockModeHint(String alias,
                              LockMode lockMode)
Apply the alias specific lock modes. 
 | 
protected boolean | 
applyCacheableHint(boolean isCacheable)
Apply the cacheable (true/false) hint. 
 | 
protected boolean | 
applyCacheModeHint(CacheMode cacheMode)
Apply the CacheMode hint. 
 | 
protected boolean | 
applyCacheRegionHint(String regionName)
Apply the cache region hint 
 | 
protected boolean | 
applyCommentHint(String comment)
Apply the comment hint. 
 | 
protected boolean | 
applyFetchSizeHint(int fetchSize)
Apply the fetch size hint 
 | 
protected void | 
applyFirstResult(int firstResult)
Apply the given first-result value. 
 | 
protected boolean | 
applyFlushModeHint(FlushMode flushMode)
Apply the FlushMode hint. 
 | 
protected boolean | 
applyLockTimeoutHint(int timeout)
Apply the lock timeout (in seconds!) hint 
 | 
protected void | 
applyMaxResults(int maxResults)
Apply the given max results value. 
 | 
protected boolean | 
applyReadOnlyHint(boolean isReadOnly)
Apply the read-only (true/false) hint. 
 | 
protected boolean | 
applyTimeoutHint(int timeout)
Apply the query timeout hint. 
 | 
protected boolean | 
canApplyAliasSpecificLockModeHints()
Can alias-specific lock modes be applied? 
 | 
Query | 
getHibernateQuery()
Gives access to the underlying Hibernate query object.. 
 | 
List<X> | 
getResultList()  | 
X | 
getSingleResult()  | 
protected void | 
internalApplyLockMode(LockModeType lockModeType)  | 
protected int | 
internalExecuteUpdate()
Actually execute the update; all pre-requisites have been checked. 
 | 
protected boolean | 
isNativeSqlQuery()
Is the query represented here a native SQL query? 
 | 
protected boolean | 
isSelectQuery()
Is the query represented here a SELECT query? 
 | 
<T> T | 
unwrap(Class<T> tClass)  | 
checkTransaction, executeUpdate, getEntityManager, getLockMode, getSupportedHints, setFirstResult, setFlushMode, setHint, setLockMode, setMaxResults, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParametercheckOpen, entityManager, findParameterRegistration, findParameterRegistration, findParameterRegistration, getEntityGraphQueryHint, getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getSpecifiedFlushMode, getSpecifiedMaxResults, isBound, registerParameter, validateBindingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetFirstResult, setFlushMode, setHint, setLockMode, setMaxResults, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterexecuteUpdate, getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBoundpublic static final EntityManagerMessageLogger LOG
public QueryImpl(Query query, AbstractEntityManagerImpl em)
public QueryImpl(Query query, AbstractEntityManagerImpl em, Map<String,Class> namedParameterTypeRedefinitions)
protected boolean isNativeSqlQuery()
BaseQueryImplisNativeSqlQuery in class BaseQueryImpltrue if it is a native SQL query; false otherwiseprotected boolean isSelectQuery()
BaseQueryImplisSelectQuery in class BaseQueryImpltrue if the query is a SELECT; false otherwise.public Query getHibernateQuery()
HibernateQuerygetHibernateQuery in interface HibernateQueryprotected int internalExecuteUpdate()
AbstractQueryImplinternalExecuteUpdate in class AbstractQueryImpl<X>protected void applyMaxResults(int maxResults)
BaseQueryImplapplyMaxResults in class BaseQueryImplmaxResults - The specified max resultsprotected void applyFirstResult(int firstResult)
BaseQueryImplapplyFirstResult in class BaseQueryImplfirstResult - The specified first-result value.protected boolean applyTimeoutHint(int timeout)
BaseQueryImplapplyTimeoutHint in class BaseQueryImpltimeout - The timeout (in seconds!) specified as a hinttrue if the hint was "applied"protected boolean applyCommentHint(String comment)
BaseQueryImplapplyCommentHint in class BaseQueryImplcomment - The comment specified as a hinttrue if the hint was "applied"protected boolean applyFetchSizeHint(int fetchSize)
BaseQueryImplapplyFetchSizeHint in class BaseQueryImplfetchSize - The fetch size specified as a hinttrue if the hint was "applied"protected boolean applyCacheableHint(boolean isCacheable)
BaseQueryImplapplyCacheableHint in class BaseQueryImplisCacheable - The value specified as hinttrue if the hint was "applied"protected boolean applyCacheRegionHint(String regionName)
BaseQueryImplapplyCacheRegionHint in class BaseQueryImplregionName - The name of the cache region specified as a hinttrue if the hint was "applied"protected boolean applyReadOnlyHint(boolean isReadOnly)
BaseQueryImplapplyReadOnlyHint in class BaseQueryImplisReadOnly - The value specified as hinttrue if the hint was "applied"protected boolean applyCacheModeHint(CacheMode cacheMode)
BaseQueryImplapplyCacheModeHint in class BaseQueryImplcacheMode - The CacheMode value specified as a hint.true if the hint was "applied"protected boolean applyFlushModeHint(FlushMode flushMode)
BaseQueryImplapplyFlushModeHint in class BaseQueryImplflushMode - The FlushMode value specified as hinttrue if the hint was "applied"protected boolean canApplyAliasSpecificLockModeHints()
BaseQueryImplcanApplyAliasSpecificLockModeHints in class BaseQueryImpltrue indicates they can be applied, false otherwise.protected void applyAliasSpecificLockModeHint(String alias, LockMode lockMode)
BaseQueryImplBaseQueryImpl.canApplyAliasSpecificLockModeHints() has already been
 called and returned true.applyAliasSpecificLockModeHint in class BaseQueryImplalias - The alias to apply the 'lockMode' to.lockMode - The LockMode to apply.public List<X> getResultList()
getResultList in interface QuerygetResultList in interface TypedQuery<X>public X getSingleResult()
getSingleResult in interface QuerygetSingleResult in interface TypedQuery<X>protected void internalApplyLockMode(LockModeType lockModeType)
internalApplyLockMode in class BaseQueryImplprotected boolean applyLockTimeoutHint(int timeout)
BaseQueryImplapplyLockTimeoutHint in class BaseQueryImpltimeout - The timeout (in seconds!) specified as a hinttrue if the hint was "applied"Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.