public class ProcedureCallImpl extends AbstractBasicQueryContractImpl implements ProcedureCall, ResultContext
ProcedureCall
Constructor and Description |
---|
ProcedureCallImpl(SessionImplementor session,
String procedureName)
The no-returns form.
|
ProcedureCallImpl(SessionImplementor session,
String procedureName,
Class... resultClasses)
The result Class(es) return form
|
ProcedureCallImpl(SessionImplementor session,
String procedureName,
String... resultSetMappings)
The result-set-mapping(s) return form
|
Modifier and Type | Method and Description |
---|---|
ProcedureCallImpl |
addSynchronizedEntityClass(Class entityClass)
Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.
|
ProcedureCallImpl |
addSynchronizedEntityName(String entityName)
Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.
|
ProcedureCallImpl |
addSynchronizedQuerySpace(String querySpace)
Adds a query space.
|
protected void |
addSynchronizedQuerySpaces(EntityPersister persister) |
QueryParameters |
buildQueryParametersObject() |
ParameterRegistrationImplementor[] |
collectRefCursorParameters()
Collects any parameter registrations which indicate a REF_CURSOR parameter type/mode.
|
ProcedureCallMemento |
extractMemento(Map<String,Object> hints)
Extract the disconnected representation of this call.
|
ProcedureOutputs |
getOutputs()
Retrieves access to outputs of this procedure call.
|
ParameterRegistrationImplementor |
getParameterRegistration(int position)
Retrieve a previously registered parameter memento by the position under which it was registered.
|
ParameterRegistrationImplementor |
getParameterRegistration(String name)
Retrieve a previously registered parameter memento by the name under which it was registered.
|
ParameterStrategy |
getParameterStrategy() |
String |
getProcedureName()
Get the name of the stored procedure to be called.
|
QueryParameters |
getQueryParameters() |
NativeSQLQueryReturn[] |
getQueryReturns() |
List<ParameterRegistration> |
getRegisteredParameters()
Retrieve all registered parameters.
|
Type[] |
getReturnTypes()
Return the Hibernate types of the query results.
|
SessionImplementor |
getSession() |
String |
getSql() |
Set<String> |
getSynchronizedQuerySpaces()
Obtain the list of query spaces the query is synchronized on.
|
<T> ParameterRegistration<T> |
registerParameter(int position,
Class<T> type,
ParameterMode mode)
Basic form for registering a positional parameter.
|
<T> ParameterRegistration<T> |
registerParameter(String name,
Class<T> type,
ParameterMode mode)
Basic form for registering a named parameter.
|
ProcedureCall |
registerParameter0(int position,
Class type,
ParameterMode mode)
|
ProcedureCall |
registerParameter0(String name,
Class type,
ParameterMode mode)
|
protected Set<String> |
synchronizedQuerySpaces()
Use this form instead of
getSynchronizedQuerySpaces() when you want to make sure the
underlying Set is instantiated (aka, on add) |
getCacheMode, getCacheRegion, getFetchSize, getFlushMode, getTimeout, isCacheable, isReadOnly, session, setCacheable, setCacheMode, setCacheRegion, setFetchSize, setFlushMode, setReadOnly, setTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCacheMode, getCacheRegion, getFetchSize, getFlushMode, getTimeout, isCacheable, isReadOnly, setCacheable, setCacheMode, setCacheRegion, setFetchSize, setFlushMode, setReadOnly, setTimeout
public ProcedureCallImpl(SessionImplementor session, String procedureName)
session
- The sessionprocedureName
- The name of the procedure to callpublic ProcedureCallImpl(SessionImplementor session, String procedureName, Class... resultClasses)
session
- The sessionprocedureName
- The name of the procedure to callresultClasses
- The classes making up the resultpublic ProcedureCallImpl(SessionImplementor session, String procedureName, String... resultSetMappings)
session
- The sessionprocedureName
- The name of the procedure to callresultSetMappings
- The names of the result set mappings making up the resultpublic SessionImplementor getSession()
getSession
in interface ResultContext
public ParameterStrategy getParameterStrategy()
public String getProcedureName()
ProcedureCall
getProcedureName
in interface ProcedureCall
public String getSql()
getSql
in interface ResultContext
public NativeSQLQueryReturn[] getQueryReturns()
getQueryReturns
in interface ResultContext
public <T> ParameterRegistration<T> registerParameter(int position, Class<T> type, ParameterMode mode)
ProcedureCall
registerParameter
in interface ProcedureCall
T
- The parameterized Java type of the parameter.position
- The positiontype
- The Java type of the parametermode
- The parameter mode (in, out, inout)public ProcedureCall registerParameter0(int position, Class type, ParameterMode mode)
ProcedureCall
registerParameter0
in interface ProcedureCall
position
- The positiontype
- The Java type of the parametermode
- The parameter mode (in, out, inout)this
, for method chainingpublic ParameterRegistrationImplementor getParameterRegistration(int position)
ProcedureCall
getParameterRegistration
in interface ProcedureCall
position
- The parameter positionpublic <T> ParameterRegistration<T> registerParameter(String name, Class<T> type, ParameterMode mode)
ProcedureCall
registerParameter
in interface ProcedureCall
T
- The parameterized Java type of the parameter.name
- The parameter nametype
- The Java type of the parametermode
- The parameter mode (in, out, inout)public ProcedureCall registerParameter0(String name, Class type, ParameterMode mode)
ProcedureCall
registerParameter0
in interface ProcedureCall
name
- The parameter nametype
- The Java type of the parametermode
- The parameter mode (in, out, inout)public ParameterRegistrationImplementor getParameterRegistration(String name)
ProcedureCall
getParameterRegistration
in interface ProcedureCall
name
- The parameter namepublic List<ParameterRegistration> getRegisteredParameters()
ProcedureCall
getRegisteredParameters
in interface ProcedureCall
public ProcedureOutputs getOutputs()
ProcedureCall
getOutputs
in interface ProcedureCall
public Type[] getReturnTypes() throws HibernateException
BasicQueryContract
getReturnTypes
in interface BasicQueryContract
HibernateException
protected Set<String> synchronizedQuerySpaces()
getSynchronizedQuerySpaces()
when you want to make sure the
underlying Set is instantiated (aka, on add)public Set<String> getSynchronizedQuerySpaces()
SynchronizeableQuery
getSynchronizedQuerySpaces
in interface ResultContext
getSynchronizedQuerySpaces
in interface SynchronizeableQuery
public ProcedureCallImpl addSynchronizedQuerySpace(String querySpace)
SynchronizeableQuery
addSynchronizedQuerySpace
in interface ProcedureCall
addSynchronizedQuerySpace
in interface SynchronizeableQuery
querySpace
- The query space to be auto-flushed for this query.this
, for method chainingpublic ProcedureCallImpl addSynchronizedEntityName(String entityName)
SynchronizeableQuery
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables associated with the given entity.addSynchronizedEntityName
in interface ProcedureCall
addSynchronizedEntityName
in interface SynchronizeableQuery
entityName
- The name of the entity upon whose defined query spaces we should additionally synchronize.this
, for method chainingprotected void addSynchronizedQuerySpaces(EntityPersister persister)
public ProcedureCallImpl addSynchronizedEntityClass(Class entityClass)
SynchronizeableQuery
SynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String)
for all tables associated with the given entity.addSynchronizedEntityClass
in interface ProcedureCall
addSynchronizedEntityClass
in interface SynchronizeableQuery
entityClass
- The class of the entity upon whose defined query spaces we should additionally synchronize.this
, for method chainingpublic QueryParameters getQueryParameters()
getQueryParameters
in interface ResultContext
public QueryParameters buildQueryParametersObject()
buildQueryParametersObject
in class AbstractBasicQueryContractImpl
public ParameterRegistrationImplementor[] collectRefCursorParameters()
public ProcedureCallMemento extractMemento(Map<String,Object> hints)
ProcedureCall
extractMemento
in interface ProcedureCall
hints
- The hints to incorporate into the mementoCopyright © 2016 JBoss by Red Hat. All rights reserved.