public class StoredProcedureQueryImpl extends BaseQueryImpl implements StoredProcedureQuery
BaseQueryImpl.ParameterBindImpl<T>
Constructor and Description |
---|
StoredProcedureQueryImpl(ProcedureCall procedureCall,
HibernateEntityManagerImplementor entityManager) |
StoredProcedureQueryImpl(ProcedureCallMemento memento,
HibernateEntityManagerImplementor entityManager)
This form is used to build a StoredProcedureQueryImpl from a memento (usually from a NamedStoredProcedureQuery).
|
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?
|
boolean |
execute() |
int |
executeUpdate() |
ProcedureCall |
getHibernateProcedureCall() |
LockModeType |
getLockMode() |
Object |
getOutputParameterValue(int position) |
Object |
getOutputParameterValue(String parameterName) |
List |
getResultList() |
Object |
getSingleResult() |
int |
getUpdateCount() |
boolean |
hasMoreResults() |
protected void |
internalApplyLockMode(LockModeType lockModeType) |
protected boolean |
isNativeSqlQuery()
Is the query represented here a native SQL query?
|
protected boolean |
isSelectQuery()
Is the query represented here a SELECT query?
|
protected ProcedureOutputs |
outputs() |
StoredProcedureQuery |
registerStoredProcedureParameter(int position,
Class type,
ParameterMode mode) |
StoredProcedureQuery |
registerStoredProcedureParameter(String parameterName,
Class type,
ParameterMode mode) |
StoredProcedureQueryImpl |
setFlushMode(FlushModeType jpaFlushMode) |
StoredProcedureQueryImpl |
setHint(String hintName,
Object value) |
Query |
setLockMode(LockModeType lockMode) |
StoredProcedureQueryImpl |
setParameter(int position,
Calendar value,
TemporalType temporalType) |
StoredProcedureQueryImpl |
setParameter(int position,
Date value,
TemporalType temporalType) |
StoredProcedureQueryImpl |
setParameter(int position,
Object value) |
StoredProcedureQueryImpl |
setParameter(Parameter<Calendar> param,
Calendar value,
TemporalType temporalType) |
StoredProcedureQueryImpl |
setParameter(Parameter<Date> param,
Date value,
TemporalType temporalType) |
<T> StoredProcedureQueryImpl |
setParameter(Parameter<T> param,
T value) |
StoredProcedureQueryImpl |
setParameter(String name,
Calendar value,
TemporalType temporalType) |
StoredProcedureQueryImpl |
setParameter(String name,
Date value,
TemporalType temporalType) |
StoredProcedureQueryImpl |
setParameter(String name,
Object value) |
<T> T |
unwrap(Class<T> cls) |
checkOpen, entityManager, findParameterRegistration, findParameterRegistration, findParameterRegistration, getEntityGraphQueryHint, getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getSpecifiedFlushMode, getSpecifiedMaxResults, getSupportedHints, isBound, registerParameter, setFirstResult, setMaxResults, validateBinding
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFirstResult, getFlushMode, getHints, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, isBound, setFirstResult, setMaxResults
public StoredProcedureQueryImpl(ProcedureCall procedureCall, HibernateEntityManagerImplementor entityManager)
public StoredProcedureQueryImpl(ProcedureCallMemento memento, HibernateEntityManagerImplementor entityManager)
memento
- The mementoentityManager
- The EntityManagerprotected boolean applyTimeoutHint(int timeout)
BaseQueryImpl
applyTimeoutHint
in class BaseQueryImpl
timeout
- The timeout (in seconds!) specified as a hinttrue
if the hint was "applied"protected boolean applyCacheableHint(boolean isCacheable)
BaseQueryImpl
applyCacheableHint
in class BaseQueryImpl
isCacheable
- The value specified as hinttrue
if the hint was "applied"protected boolean applyCacheRegionHint(String regionName)
BaseQueryImpl
applyCacheRegionHint
in class BaseQueryImpl
regionName
- The name of the cache region specified as a hinttrue
if the hint was "applied"protected boolean applyReadOnlyHint(boolean isReadOnly)
BaseQueryImpl
applyReadOnlyHint
in class BaseQueryImpl
isReadOnly
- The value specified as hinttrue
if the hint was "applied"protected boolean applyCacheModeHint(CacheMode cacheMode)
BaseQueryImpl
applyCacheModeHint
in class BaseQueryImpl
cacheMode
- The CacheMode value specified as a hint.true
if the hint was "applied"protected boolean applyFlushModeHint(FlushMode flushMode)
BaseQueryImpl
applyFlushModeHint
in class BaseQueryImpl
flushMode
- The FlushMode value specified as hinttrue
if the hint was "applied"public StoredProcedureQuery registerStoredProcedureParameter(int position, Class type, ParameterMode mode)
registerStoredProcedureParameter
in interface StoredProcedureQuery
public StoredProcedureQuery registerStoredProcedureParameter(String parameterName, Class type, ParameterMode mode)
registerStoredProcedureParameter
in interface StoredProcedureQuery
public <T> StoredProcedureQueryImpl setParameter(Parameter<T> param, T value)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(Parameter<Date> param, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(String name, Object value)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(String name, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(String name, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(int position, Object value)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(int position, Calendar value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setParameter(int position, Date value, TemporalType temporalType)
setParameter
in interface Query
setParameter
in interface StoredProcedureQuery
setParameter
in class BaseQueryImpl
public StoredProcedureQueryImpl setFlushMode(FlushModeType jpaFlushMode)
setFlushMode
in interface Query
setFlushMode
in interface StoredProcedureQuery
setFlushMode
in class BaseQueryImpl
public StoredProcedureQueryImpl setHint(String hintName, Object value)
setHint
in interface Query
setHint
in interface StoredProcedureQuery
setHint
in class BaseQueryImpl
public boolean execute()
execute
in interface StoredProcedureQuery
protected ProcedureOutputs outputs()
public int executeUpdate()
executeUpdate
in interface Query
public Object getOutputParameterValue(int position)
getOutputParameterValue
in interface StoredProcedureQuery
public Object getOutputParameterValue(String parameterName)
getOutputParameterValue
in interface StoredProcedureQuery
public boolean hasMoreResults()
hasMoreResults
in interface StoredProcedureQuery
public int getUpdateCount()
getUpdateCount
in interface StoredProcedureQuery
public List getResultList()
getResultList
in interface Query
public Object getSingleResult()
getSingleResult
in interface Query
protected boolean isNativeSqlQuery()
BaseQueryImpl
isNativeSqlQuery
in class BaseQueryImpl
true
if it is a native SQL query; false
otherwiseprotected boolean isSelectQuery()
BaseQueryImpl
isSelectQuery
in class BaseQueryImpl
true
if the query is a SELECT; false
otherwise.public Query setLockMode(LockModeType lockMode)
setLockMode
in interface Query
public LockModeType getLockMode()
getLockMode
in interface Query
protected void internalApplyLockMode(LockModeType lockModeType)
internalApplyLockMode
in class BaseQueryImpl
protected void applyFirstResult(int firstResult)
BaseQueryImpl
applyFirstResult
in class BaseQueryImpl
firstResult
- The specified first-result value.protected void applyMaxResults(int maxResults)
BaseQueryImpl
applyMaxResults
in class BaseQueryImpl
maxResults
- The specified max resultsprotected boolean canApplyAliasSpecificLockModeHints()
BaseQueryImpl
canApplyAliasSpecificLockModeHints
in class BaseQueryImpl
true
indicates they can be applied, false
otherwise.protected void applyAliasSpecificLockModeHint(String alias, LockMode lockMode)
BaseQueryImpl
BaseQueryImpl.canApplyAliasSpecificLockModeHints()
has already been
called and returned true
.applyAliasSpecificLockModeHint
in class BaseQueryImpl
alias
- The alias to apply the 'lockMode' to.lockMode
- The LockMode to apply.protected boolean applyLockTimeoutHint(int timeout)
BaseQueryImpl
applyLockTimeoutHint
in class BaseQueryImpl
timeout
- The timeout (in seconds!) specified as a hinttrue
if the hint was "applied"protected boolean applyCommentHint(String comment)
BaseQueryImpl
applyCommentHint
in class BaseQueryImpl
comment
- The comment specified as a hinttrue
if the hint was "applied"protected boolean applyFetchSizeHint(int fetchSize)
BaseQueryImpl
applyFetchSizeHint
in class BaseQueryImpl
fetchSize
- The fetch size specified as a hinttrue
if the hint was "applied"public ProcedureCall getHibernateProcedureCall()
Copyright © 2001-2017 Red Hat, Inc. All Rights Reserved.