public interface ProcedureCall extends BasicQueryContract<CommonQueryContract>, SynchronizeableQuery, StoredProcedureQuery
Defines support for executing database stored procedures and functions
Modifier and Type | Method and Description |
---|---|
ProcedureCall |
addSynchronizedEntityClass(Class entityClass)
Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.
|
ProcedureCall |
addSynchronizedEntityName(String entityName)
Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.
|
ProcedureCall |
addSynchronizedQuerySpace(String querySpace)
Adds a query space.
|
ProcedureCallMemento |
extractMemento()
Extract the disconnected representation of this call.
|
ProcedureCallMemento |
extractMemento(Map<String,Object> hints)
Extract the disconnected representation of this call.
|
ProcedureOutputs |
getOutputs()
Retrieves access to outputs of this procedure call.
|
ParameterRegistration |
getParameterRegistration(int position)
Retrieve a previously registered parameter memento by the position under which it was registered.
|
ParameterRegistration |
getParameterRegistration(String name)
Retrieve a previously registered parameter memento by the name under which it was registered.
|
String |
getProcedureName()
Get the name of the stored procedure to be called.
|
List<ParameterRegistration> |
getRegisteredParameters()
Retrieve all registered parameters.
|
<T> ParameterRegistration<T> |
registerParameter(int position,
Class<T> type,
ParameterMode mode)
Basic form for registering a positional parameter.
|
<T> ParameterRegistration<T> |
registerParameter(String parameterName,
Class<T> type,
ParameterMode mode)
Basic form for registering a named parameter.
|
ProcedureCall |
registerParameter0(int position,
Class type,
ParameterMode mode)
Chained form of
registerParameter(int, Class, javax.persistence.ParameterMode) |
ProcedureCall |
registerParameter0(String parameterName,
Class type,
ParameterMode mode)
|
getCacheMode, getCacheRegion, getFetchSize, getHibernateFlushMode, getReturnTypes, getTimeout, isCacheable, isReadOnly, setCacheable, setCacheMode, setCacheRegion, setFetchSize, setFlushMode, setHibernateFlushMode, setReadOnly, setTimeout
getSynchronizedQuerySpaces
execute, executeUpdate, getOutputParameterValue, getOutputParameterValue, getResultList, getSingleResult, getUpdateCount, hasMoreResults, registerStoredProcedureParameter, registerStoredProcedureParameter, setFlushMode, setHint, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter
getFirstResult, getFlushMode, getHints, getLockMode, getMaxResults, getParameter, getParameter, getParameter, getParameter, getParameters, getParameterValue, getParameterValue, getParameterValue, getResultStream, isBound, setFirstResult, setLockMode, setMaxResults, unwrap
ProcedureCall addSynchronizedQuerySpace(String querySpace)
SynchronizeableQuery
Adds a query space.
addSynchronizedQuerySpace
in interface SynchronizeableQuery
querySpace
- The query space to be auto-flushed for this query.this
, for method chainingProcedureCall addSynchronizedEntityName(String entityName) throws MappingException
SynchronizeableQuery
Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking. Same as
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables associated with the given entity.
addSynchronizedEntityName
in interface SynchronizeableQuery
entityName
- The name of the entity upon whose defined query spaces we should additionally synchronize.this
, for method chainingMappingException
- Indicates the given name could not be resolved as an entityProcedureCall addSynchronizedEntityClass(Class entityClass) throws MappingException
SynchronizeableQuery
Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking. Same as
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables associated with the given entity.
addSynchronizedEntityClass
in interface SynchronizeableQuery
entityClass
- The class of the entity upon whose defined query spaces we should additionally synchronize.this
, for method chainingMappingException
- Indicates the given class could not be resolved as an entityString getProcedureName()
Get the name of the stored procedure to be called.
<T> ParameterRegistration<T> registerParameter(int position, Class<T> type, ParameterMode mode)
Basic form for registering a positional parameter.
T
- The parameterized Java type of the parameter.position
- The positiontype
- The Java type of the parametermode
- The parameter mode (in, out, inout)ProcedureCall registerParameter0(int position, Class type, ParameterMode mode)
Chained form of registerParameter(int, Class, javax.persistence.ParameterMode)
position
- The positiontype
- The Java type of the parametermode
- The parameter mode (in, out, inout)this
, for method chainingParameterRegistration getParameterRegistration(int position)
Retrieve a previously registered parameter memento by the position under which it was registered.
position
- The parameter positionParameterStrategyException
- If the ProcedureCall is defined using named parametersNoSuchParameterException
- If no parameter with that position exists<T> ParameterRegistration<T> registerParameter(String parameterName, Class<T> type, ParameterMode mode) throws NamedParametersNotSupportedException
Basic form for registering a named parameter.
T
- The parameterized Java type of the parameter.parameterName
- The parameter nametype
- The Java type of the parametermode
- The parameter mode (in, out, inout)NamedParametersNotSupportedException
- When the underlying database is known to not support
named procedure parameters.ProcedureCall registerParameter0(String parameterName, Class type, ParameterMode mode) throws NamedParametersNotSupportedException
parameterName
- The parameter nametype
- The Java type of the parametermode
- The parameter mode (in, out, inout)NamedParametersNotSupportedException
- When the underlying database is known to not support
named procedure parameters.ParameterRegistration getParameterRegistration(String name)
Retrieve a previously registered parameter memento by the name under which it was registered.
name
- The parameter nameParameterStrategyException
- If the ProcedureCall is defined using positional parametersNoSuchParameterException
- If no parameter with that name existsList<ParameterRegistration> getRegisteredParameters()
Retrieve all registered parameters.
ProcedureOutputs getOutputs()
Retrieves access to outputs of this procedure call. Can be called multiple times, returning the same ProcedureOutputs instance each time. <p/> If the procedure call has not actually be executed yet, it will be executed and then the ProcedureOutputs will be returned.
ProcedureCallMemento extractMemento(Map<String,Object> hints)
Extract the disconnected representation of this call. Used in HEM to allow redefining a named query
hints
- The hints to incorporate into the mementoProcedureCallMemento extractMemento()
Extract the disconnected representation of this call. Used in HEM to allow redefining a named query *
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.