public abstract class AbstractQueryImpl<X> extends Object implements TypedQuery<X>
Query and
 TypedQuery.
 
 IMPL NOTE : This issue, and the reason for this distinction, is that criteria and hl.sql queries share no
 commonality currently in Hibernate internals.| Constructor and Description | 
|---|
AbstractQueryImpl(HibernateEntityManagerImplementor entityManager)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected abstract void | 
applyAliasSpecificLockMode(String alias,
                          LockMode lockMode)  | 
protected abstract void | 
applyCacheable(boolean isCacheable)  | 
protected abstract void | 
applyCacheMode(CacheMode cacheMode)  | 
protected abstract void | 
applyCacheRegion(String regionName)  | 
protected abstract void | 
applyComment(String comment)  | 
protected abstract void | 
applyFetchSize(int fetchSize)  | 
protected abstract void | 
applyFirstResult(int firstResult)
Apply the given first-result value. 
 | 
protected abstract void | 
applyFlushMode(FlushMode flushMode)  | 
protected abstract void | 
applyMaxResults(int maxResults)
Apply the given max results value. 
 | 
protected abstract void | 
applyReadOnly(boolean isReadOnly)  | 
protected abstract void | 
applyTimeout(int timeout)  | 
protected abstract boolean | 
canApplyLockModes()  | 
int | 
executeUpdate()
Execute an update or delete statement. 
 | 
protected HibernateEntityManagerImplementor | 
getEntityManager()  | 
int | 
getFirstResult()
The position of the first result the query object was set to
 retrieve. 
 | 
FlushModeType | 
getFlushMode()
Get the flush mode in effect for the query execution. 
 | 
Map<String,Object> | 
getHints()
Get the properties and hints and associated values that are
 in effect for the query instance. 
 | 
abstract LockModeType | 
getLockMode()
Get the current lock mode for the query. 
 | 
int | 
getMaxResults()
The maximum number of results the query object was set to
 retrieve. 
 | 
Object | 
getParameterValue(int position)
Return the value bound to the positional parameter. 
 | 
<T> T | 
getParameterValue(Parameter<T> param)
Return the value bound to the parameter. 
 | 
Object | 
getParameterValue(String name)
Return the value bound to the named parameter. 
 | 
protected FlushModeType | 
getSpecifiedFlushMode()  | 
int | 
getSpecifiedMaxResults()  | 
Set<String> | 
getSupportedHints()  | 
protected abstract int | 
internalExecuteUpdate()
Actually execute the update; all pre-requisites have been checked. 
 | 
boolean | 
isBound(Parameter<?> param)
Return a boolean indicating whether a value has been bound
 to the parameter. 
 | 
protected void | 
registerParameterBinding(Parameter parameter,
                        Object value)  | 
TypedQuery<X> | 
setFirstResult(int firstResult)
Set the position of the first result to retrieve. 
 | 
TypedQuery<X> | 
setFlushMode(FlushModeType jpaFlushMode)
Set the flush mode type to be used for the query execution. 
 | 
TypedQuery<X> | 
setHint(String hintName,
       Object value)
Set a query property or hint. 
 | 
abstract TypedQuery<X> | 
setLockMode(LockModeType lockModeType)
Set the lock mode type to be used for the query execution. 
 | 
TypedQuery<X> | 
setMaxResults(int maxResult)
Set the maximum number of results to retrieve. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResultList, getSingleResult, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParametergetParameter, getParameter, getParameter, getParameter, getParameters, unwrappublic AbstractQueryImpl(HibernateEntityManagerImplementor entityManager)
protected HibernateEntityManagerImplementor getEntityManager()
protected abstract int internalExecuteUpdate()
public int executeUpdate()
QueryexecuteUpdate in interface Queryprotected abstract void applyMaxResults(int maxResults)
maxResults - The specified max resultspublic TypedQuery<X> setMaxResults(int maxResult)
TypedQuerysetMaxResults in interface QuerysetMaxResults in interface TypedQuery<X>maxResult - maximum number of results to retrievepublic int getSpecifiedMaxResults()
public int getMaxResults()
QueryInteger.MAX_VALUE if setMaxResults was not
 applied to the query object.getMaxResults in interface Queryprotected abstract void applyFirstResult(int firstResult)
firstResult - The specified first-result value.public TypedQuery<X> setFirstResult(int firstResult)
TypedQuerysetFirstResult in interface QuerysetFirstResult in interface TypedQuery<X>firstResult - position of the first result,
 numbered from 0public int getFirstResult()
QuerysetFirstResult was not applied to the
 query object.getFirstResult in interface Querypublic Map<String,Object> getHints()
Queryprotected abstract void applyTimeout(int timeout)
protected abstract void applyComment(String comment)
protected abstract void applyFetchSize(int fetchSize)
protected abstract void applyCacheable(boolean isCacheable)
protected abstract void applyCacheRegion(String regionName)
protected abstract void applyReadOnly(boolean isReadOnly)
protected abstract void applyCacheMode(CacheMode cacheMode)
protected abstract void applyFlushMode(FlushMode flushMode)
protected abstract boolean canApplyLockModes()
protected abstract void applyAliasSpecificLockMode(String alias, LockMode lockMode)
public TypedQuery<X> setHint(String hintName, Object value)
TypedQuerysetHint in interface QuerysetHint in interface TypedQuery<X>hintName - name of property or hintvalue - value for the property or hintpublic abstract TypedQuery<X> setLockMode(LockModeType lockModeType)
TypedQuerysetLockMode in interface QuerysetLockMode in interface TypedQuery<X>lockModeType - lock modepublic abstract LockModeType getLockMode()
QuerygetLockMode in interface Querypublic TypedQuery<X> setFlushMode(FlushModeType jpaFlushMode)
TypedQuerysetFlushMode in interface QuerysetFlushMode in interface TypedQuery<X>jpaFlushMode - flush modeprotected FlushModeType getSpecifiedFlushMode()
public FlushModeType getFlushMode()
QuerygetFlushMode in interface Querypublic boolean isBound(Parameter<?> param)
Querypublic <T> T getParameterValue(Parameter<T> param)
QuerygetParameterValue in interface Queryparam - parameter objectpublic Object getParameterValue(String name)
QuerygetParameterValue in interface Queryname - parameter namepublic Object getParameterValue(int position)
QuerygetParameterValue in interface Queryposition - positionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.