public class QueryImpl<X> extends AbstractQueryImpl<X> implements TypedQuery<X>, HibernateQuery
Query
and TypedQuery
contracts.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 |
applyAliasSpecificLockMode(String alias,
LockMode lockMode) |
protected void |
applyCacheable(boolean isCacheable) |
protected void |
applyCacheMode(CacheMode cacheMode) |
protected void |
applyCacheRegion(String regionName) |
protected void |
applyComment(String comment) |
protected void |
applyFetchSize(int fetchSize) |
protected void |
applyFirstResult(int firstResult)
Apply the given first-result value.
|
protected void |
applyFlushMode(FlushMode flushMode) |
protected void |
applyLockTimeout(int timeout) |
protected void |
applyMaxResults(int maxResults)
Apply the given max results value.
|
protected void |
applyReadOnly(boolean isReadOnly) |
protected void |
applyTimeout(int timeout) |
protected boolean |
canApplyLockModes() |
Query |
getHibernateQuery() |
LockModeType |
getLockMode() |
Parameter<?> |
getParameter(int position) |
<T> Parameter<T> |
getParameter(int position,
Class<T> type) |
Parameter<?> |
getParameter(String name) |
<T> Parameter<T> |
getParameter(String name,
Class<T> type) |
Set<Parameter<?>> |
getParameters() |
List<X> |
getResultList() |
X |
getSingleResult() |
protected int |
internalExecuteUpdate()
Actually execute the update; all pre-requisites have been checked.
|
TypedQuery<X> |
setLockMode(LockModeType lockModeType) |
TypedQuery<X> |
setParameter(int position,
Calendar value,
TemporalType temporalType) |
TypedQuery<X> |
setParameter(int position,
Date value,
TemporalType temporalType) |
TypedQuery<X> |
setParameter(int position,
Object value) |
TypedQuery<X> |
setParameter(Parameter<Calendar> param,
Calendar value,
TemporalType temporalType) |
TypedQuery<X> |
setParameter(Parameter<Date> param,
Date value,
TemporalType temporalType) |
<T> TypedQuery<X> |
setParameter(Parameter<T> param,
T value) |
TypedQuery<X> |
setParameter(String name,
Calendar value,
TemporalType temporalType) |
TypedQuery<X> |
setParameter(String name,
Date value,
TemporalType temporalType) |
TypedQuery<X> |
setParameter(String name,
Object value) |
<T> T |
unwrap(Class<T> tClass) |
executeUpdate, getEntityManager, getFirstResult, getFlushMode, getHints, getMaxResults, getParameterValue, getParameterValue, getParameterValue, getSpecifiedFlushMode, getSpecifiedMaxResults, getSupportedHints, isBound, registerParameterBinding, setFirstResult, setFlushMode, setHint, setMaxResults
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setFirstResult, setFlushMode, setHint, setMaxResults
executeUpdate, getFirstResult, getFlushMode, getHints, getMaxResults, getParameterValue, getParameterValue, getParameterValue, isBound
public static final EntityManagerMessageLogger LOG
public QueryImpl(Query query, AbstractEntityManagerImpl em)
public QueryImpl(Query query, AbstractEntityManagerImpl em, Map<String,Class> namedParameterTypeRedefinitions)
public Query getHibernateQuery()
getHibernateQuery
in interface HibernateQuery
protected int internalExecuteUpdate()
AbstractQueryImpl
internalExecuteUpdate
in class AbstractQueryImpl<X>
protected void applyMaxResults(int maxResults)
AbstractQueryImpl
applyMaxResults
in class AbstractQueryImpl<X>
maxResults
- The specified max resultsprotected void applyFirstResult(int firstResult)
AbstractQueryImpl
applyFirstResult
in class AbstractQueryImpl<X>
firstResult
- The specified first-result value.protected void applyTimeout(int timeout)
applyTimeout
in class AbstractQueryImpl<X>
protected void applyComment(String comment)
applyComment
in class AbstractQueryImpl<X>
protected void applyFetchSize(int fetchSize)
applyFetchSize
in class AbstractQueryImpl<X>
protected void applyCacheable(boolean isCacheable)
applyCacheable
in class AbstractQueryImpl<X>
protected void applyCacheRegion(String regionName)
applyCacheRegion
in class AbstractQueryImpl<X>
protected void applyReadOnly(boolean isReadOnly)
applyReadOnly
in class AbstractQueryImpl<X>
protected void applyCacheMode(CacheMode cacheMode)
applyCacheMode
in class AbstractQueryImpl<X>
protected void applyFlushMode(FlushMode flushMode)
applyFlushMode
in class AbstractQueryImpl<X>
protected boolean canApplyLockModes()
canApplyLockModes
in class AbstractQueryImpl<X>
protected void applyAliasSpecificLockMode(String alias, LockMode lockMode)
applyAliasSpecificLockMode
in class AbstractQueryImpl<X>
public List<X> getResultList()
getResultList
in interface Query
getResultList
in interface TypedQuery<X>
public X getSingleResult()
getSingleResult
in interface Query
getSingleResult
in interface TypedQuery<X>
public <T> TypedQuery<X> setParameter(Parameter<T> param, T value)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(String name, Object value)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(String name, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(String name, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(int position, Object value)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(int position, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public TypedQuery<X> setParameter(int position, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface TypedQuery<X>
public Set<Parameter<?>> getParameters()
getParameters
in interface Query
public Parameter<?> getParameter(String name)
getParameter
in interface Query
public Parameter<?> getParameter(int position)
getParameter
in interface Query
public <T> Parameter<T> getParameter(String name, Class<T> type)
getParameter
in interface Query
public <T> Parameter<T> getParameter(int position, Class<T> type)
getParameter
in interface Query
public TypedQuery<X> setLockMode(LockModeType lockModeType)
setLockMode
in interface Query
setLockMode
in interface TypedQuery<X>
setLockMode
in class AbstractQueryImpl<X>
protected void applyLockTimeout(int timeout)
applyLockTimeout
in class AbstractQueryImpl<X>
public LockModeType getLockMode()
getLockMode
in interface Query
getLockMode
in class AbstractQueryImpl<X>
Copyright © 2001-2013 Red Hat, Inc. All Rights Reserved.