public abstract class AbstractQueryImpl<X> extends BaseQueryImpl implements TypedQuery<X>
Query and TypedQuery, including
query references built from criteria queries.
Not intended as base for StoredProcedureQueryBaseQueryImpl.ParameterBindImpl<T>| Constructor and Description |
|---|
AbstractQueryImpl(HibernateEntityManagerImplementor entityManager) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkTransaction() |
int |
executeUpdate()
Execute an update or delete statement.
|
protected HibernateEntityManagerImplementor |
getEntityManager() |
LockModeType |
getLockMode()
Get the current lock mode for the query.
|
Set<String> |
getSupportedHints() |
protected abstract int |
internalExecuteUpdate()
Actually execute the update; all pre-requisites have been checked.
|
AbstractQueryImpl<X> |
setFirstResult(int firstResult)
Set the position of the first result to retrieve.
|
AbstractQueryImpl<X> |
setFlushMode(FlushModeType jpaFlushMode)
Set the flush mode type to be used for the query execution.
|
AbstractQueryImpl<X> |
setHint(String hintName,
Object value)
Set a query property or hint.
|
TypedQuery<X> |
setLockMode(LockModeType lockModeType)
Set the lock mode type to be used for the query execution.
|
AbstractQueryImpl<X> |
setMaxResults(int maxResults)
Set the maximum number of results to retrieve.
|
AbstractQueryImpl<X> |
setParameter(int position,
Calendar value,
TemporalType temporalType)
Bind an instance of
java.util.Calendar to a positional
parameter. |
AbstractQueryImpl<X> |
setParameter(int position,
Date value,
TemporalType temporalType)
Bind an instance of
java.util.Date to a positional parameter. |
AbstractQueryImpl<X> |
setParameter(int position,
Object value)
Bind an argument to a positional parameter.
|
AbstractQueryImpl<X> |
setParameter(Parameter<Calendar> param,
Calendar value,
TemporalType temporalType)
Bind an instance of
java.util.Calendar to a Parameter object. |
AbstractQueryImpl<X> |
setParameter(Parameter<Date> param,
Date value,
TemporalType temporalType)
Bind an instance of
java.util.Date to a Parameter object. |
<T> AbstractQueryImpl<X> |
setParameter(Parameter<T> param,
T value)
Bind the value of a
Parameter object. |
AbstractQueryImpl<X> |
setParameter(String name,
Calendar value,
TemporalType temporalType)
Bind an instance of
java.util.Calendar to a named parameter. |
AbstractQueryImpl<X> |
setParameter(String name,
Date value,
TemporalType temporalType)
Bind an instance of
java.util.Date to a named parameter. |
AbstractQueryImpl<X> |
setParameter(String name,
Object value)
Bind an argument to a named parameter.
|
applyAliasSpecificLockModeHint, applyCacheableHint, applyCacheModeHint, applyCacheRegionHint, applyCommentHint, applyFetchSizeHint, applyFirstResult, applyFlushModeHint, applyLockTimeoutHint, applyMaxResults, applyReadOnlyHint, applyTimeoutHint, canApplyAliasSpecificLockModeHints, checkOpen, entityManager, findParameterRegistration, findParameterRegistration, findParameterRegistration, getEntityGraphQueryHint, getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getSpecifiedFlushMode, getSpecifiedMaxResults, internalApplyLockMode, isBound, isNativeSqlQuery, isSelectQuery, registerParameter, validateBindingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResultList, getSingleResultgetFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound, unwrappublic AbstractQueryImpl(HibernateEntityManagerImplementor entityManager)
protected HibernateEntityManagerImplementor getEntityManager()
protected abstract int internalExecuteUpdate()
public int executeUpdate()
QueryexecuteUpdate in interface Querypublic AbstractQueryImpl<X> setMaxResults(int maxResults)
QuerysetMaxResults in interface QuerysetMaxResults in interface TypedQuery<X>setMaxResults in class BaseQueryImplmaxResults - maximum number of results to retrievepublic AbstractQueryImpl<X> setFirstResult(int firstResult)
QuerysetFirstResult in interface QuerysetFirstResult in interface TypedQuery<X>setFirstResult in class BaseQueryImplfirstResult - position of the first result,
numbered from 0public AbstractQueryImpl<X> setHint(String hintName, Object value)
QuerysetHint in interface QuerysetHint in interface TypedQuery<X>setHint in class BaseQueryImplhintName - name of the property or hintvalue - value for the property or hintpublic Set<String> getSupportedHints()
getSupportedHints in class BaseQueryImplpublic TypedQuery<X> setLockMode(LockModeType lockModeType)
TypedQuerysetLockMode in interface QuerysetLockMode in interface TypedQuery<X>lockModeType - lock modepublic LockModeType getLockMode()
QuerygetLockMode in interface Querypublic <T> AbstractQueryImpl<X> setParameter(Parameter<T> param, T value)
QueryParameter object.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplparam - parameter objectvalue - parameter valuepublic AbstractQueryImpl<X> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
Queryjava.util.Calendar to a Parameter object.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplparam - parameter objectvalue - parameter valuetemporalType - temporal typepublic AbstractQueryImpl<X> setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
Queryjava.util.Date to a Parameter object.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplparam - parameter objectvalue - parameter valuetemporalType - temporal typepublic AbstractQueryImpl<X> setParameter(String name, Object value)
QuerysetParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplname - parameter namevalue - parameter valuepublic AbstractQueryImpl<X> setParameter(String name, Calendar value, TemporalType temporalType)
Queryjava.util.Calendar to a named parameter.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplname - parameter namevalue - parameter valuetemporalType - temporal typepublic AbstractQueryImpl<X> setParameter(String name, Date value, TemporalType temporalType)
Queryjava.util.Date to a named parameter.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplname - parameter namevalue - parameter valuetemporalType - temporal typepublic AbstractQueryImpl<X> setParameter(int position, Object value)
QuerysetParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplposition - positionvalue - parameter valuepublic AbstractQueryImpl<X> setParameter(int position, Calendar value, TemporalType temporalType)
Queryjava.util.Calendar to a positional
parameter.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplposition - positionvalue - parameter valuetemporalType - temporal typepublic AbstractQueryImpl<X> setParameter(int position, Date value, TemporalType temporalType)
Queryjava.util.Date to a positional parameter.setParameter in interface QuerysetParameter in interface TypedQuery<X>setParameter in class BaseQueryImplposition - positionvalue - parameter valuetemporalType - temporal typepublic AbstractQueryImpl<X> setFlushMode(FlushModeType jpaFlushMode)
QuerysetFlushMode in interface QuerysetFlushMode in interface TypedQuery<X>setFlushMode in class BaseQueryImpljpaFlushMode - flush modeprotected void checkTransaction()
Copyright © 2017 JBoss by Red Hat. All rights reserved.