Top Description Methods
org.hibernate.procedure

public Interface ProcedureCall

extends BasicQueryContract<CommonQueryContract>, SynchronizeableQuery, StoredProcedureQuery
Known Direct Subinterfaces
org.hibernate.procedure.spi.ProcedureCallImplementor
Imports
java.util.List, .Map, javax.persistence.ParameterMode, .StoredProcedureQuery, org.hibernate.BasicQueryContract, .MappingException, .SynchronizeableQuery, org.hibernate.query.CommonQueryContract

Deprecated

as a consequence of BasicQueryContract being deprecated. See corresponding docs for further information.

Defines support for executing database stored procedures and functions
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public ProcedureCall
addSynchronizedEntityClass(Class<T>
The class of the entity upon whose defined query spaces we should additionally synchronize.
entityClass
)

Redeclares org.hibernate.SynchronizeableQuery.addSynchronizedEntityClass.

Deprecated as a consequence of ProcedureCall being deprecated.
Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking.
public ProcedureCall
addSynchronizedEntityName(String
The name of the entity upon whose defined query spaces we should additionally synchronize.
entityName
)

Redeclares org.hibernate.SynchronizeableQuery.addSynchronizedEntityName.

Deprecated as a consequence of ProcedureCall being deprecated.
Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking.
public ProcedureCall
addSynchronizedQuerySpace(String
The query space to be auto-flushed for this query.
querySpace
)

Redeclares org.hibernate.SynchronizeableQuery.addSynchronizedQuerySpace.

Deprecated as a consequence of ProcedureCall being deprecated.
Adds a query space.
public ProcedureCallMemento

Returns:

The memento
extractMemento
(Map<String, Object>
The hints to incorporate into the memento
hints
)

Extract the disconnected representation of this call.

public ProcedureCallMemento

Returns:

The memento
extractMemento
()

Extract the disconnected representation of this call.

public ProcedureOutputs

Returns:

The ProcedureOutputs representation
getOutputs
()

Retrieves access to outputs of this procedure call.

public ParameterRegistration<T>

Returns:

The parameter registration memento
getParameterRegistration
(int
The parameter position
position
)

Retrieve a previously registered parameter memento by the position under which it was registered.

public ParameterRegistration<T>

Returns:

The parameter registration memento
getParameterRegistration
(String
The parameter name
name
)

Retrieve a previously registered parameter memento by the name under which it was registered.

public String

Returns:

The procedure name.
getProcedureName
()

Get the name of the stored procedure to be called.

public List<ParameterRegistration<T>>

Returns:

The (immutable) list of all registered parameters.
getRegisteredParameters
()

Retrieve all registered parameters.

public <
The parameterized Java type of the parameter.
T
>
ParameterRegistration<T>

Returns:

The parameter registration memento
registerParameter
(int
The position
position
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Basic form for registering a positional parameter.

public <
The parameterized Java type of the parameter.
T
>
ParameterRegistration<T>

Returns:

The parameter registration memento
registerParameter
(String
The parameter name
parameterName
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Basic form for registering a named parameter.

public ProcedureCall

Returns:

this, for method chaining
registerParameter0
(int
The position
position
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Deprecated as a consequence of ProcedureCall being deprecated.
Chained form of registerParameter(int, Class, javax.persistence.ParameterMode)
public ProcedureCall

Returns:

The parameter registration memento
registerParameter0
(String
The parameter name
parameterName
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Deprecated as a consequence of ProcedureCall being deprecated.
Chained form of registerParameter(String, Class, javax.persistence.ParameterMode)
Inherited from javax.persistence.StoredProcedureQuery:
executeexecuteUpdategetOutputParameterValuegetOutputParameterValuegetResultListgetSingleResultgetUpdateCounthasMoreResultsregisterStoredProcedureParameterregisterStoredProcedureParametersetFlushModesetHintsetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParameter
Inherited from org.hibernate.BasicQueryContract:
getCacheModegetCacheRegiongetFetchSizegetHibernateFlushModegetReturnTypesgetTimeoutisCacheableisReadOnlysetCacheablesetCacheModesetCacheRegionsetFetchSizesetFlushModesetHibernateFlushModesetReadOnlysetTimeout
Inherited from org.hibernate.SynchronizeableQuery:
addSynchronizedEntityClassaddSynchronizedEntityNameaddSynchronizedQuerySpaceaddSynchronizedTableaddSynchronizedTablegetSynchronizedQuerySpaces

Method Detail

addSynchronizedEntityClassback to summary
public ProcedureCall addSynchronizedEntityClass(Class<T> entityClass) throws MappingException

Redeclares org.hibernate.SynchronizeableQuery.addSynchronizedEntityClass.

Doc from org.hibernate.SynchronizeableQuery.addSynchronizedEntityClass.

Deprecated

as a consequence of ProcedureCall being deprecated. See corresponding docs for further information.

Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking. Same as addSynchronizedQuerySpace for all tables associated with the given entity.

Parameters
entityClass:Class<T>

The class of the entity upon whose defined query spaces we should additionally synchronize.

Returns:ProcedureCall

this, for method chaining

Annotations
@Override
Exceptions
MappingException:
Indicates the given class could not be resolved as an entity
addSynchronizedEntityNameback to summary
public ProcedureCall addSynchronizedEntityName(String entityName) throws MappingException

Redeclares org.hibernate.SynchronizeableQuery.addSynchronizedEntityName.

Doc from org.hibernate.SynchronizeableQuery.addSynchronizedEntityName.

Deprecated

as a consequence of ProcedureCall being deprecated. See corresponding docs for further information.

Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking. Same as addSynchronizedQuerySpace for all tables associated with the given entity.

Parameters
entityName:String

The name of the entity upon whose defined query spaces we should additionally synchronize.

Returns:ProcedureCall

this, for method chaining

Annotations
@Override
Exceptions
MappingException:
Indicates the given name could not be resolved as an entity
addSynchronizedQuerySpaceback to summary
public ProcedureCall addSynchronizedQuerySpace(String querySpace)

Redeclares org.hibernate.SynchronizeableQuery.addSynchronizedQuerySpace.

Doc from org.hibernate.SynchronizeableQuery.addSynchronizedQuerySpace.

Deprecated

as a consequence of ProcedureCall being deprecated. See corresponding docs for further information.

Adds a query space.

Parameters
querySpace:String

The query space to be auto-flushed for this query.

Returns:ProcedureCall

this, for method chaining

Annotations
@Override
extractMementoback to summary
public ProcedureCallMemento extractMemento(Map<String, Object> hints)

Extract the disconnected representation of this call. Used in HEM to allow redefining a named query

Parameters
hints:Map<String, Object>

The hints to incorporate into the memento

Returns:ProcedureCallMemento

The memento

extractMementoback to summary
public ProcedureCallMemento extractMemento()

Extract the disconnected representation of this call. Used in HEM to allow redefining a named query *

Returns:ProcedureCallMemento

The memento

getOutputsback to summary
public ProcedureOutputs getOutputs()

Retrieves access to outputs of this procedure call. Can be called multiple times, returning the same ProcedureOutputs instance each time.

If the procedure call has not actually be executed yet, it will be executed and then the ProcedureOutputs will be returned.

Returns:ProcedureOutputs

The ProcedureOutputs representation

getParameterRegistrationback to summary
public ParameterRegistration<T> getParameterRegistration(int position)

Retrieve a previously registered parameter memento by the position under which it was registered.

Parameters
position:int

The parameter position

Returns:ParameterRegistration<T>

The parameter registration memento

Exceptions
ParameterStrategyException:
If the ProcedureCall is defined using named parameters
NoSuchParameterException:
If no parameter with that position exists
getParameterRegistrationback to summary
public ParameterRegistration<T> getParameterRegistration(String name)

Retrieve a previously registered parameter memento by the name under which it was registered.

Parameters
name:String

The parameter name

Returns:ParameterRegistration<T>

The parameter registration memento

Exceptions
ParameterStrategyException:
If the ProcedureCall is defined using positional parameters
NoSuchParameterException:
If no parameter with that name exists
getProcedureNameback to summary
public String getProcedureName()

Get the name of the stored procedure to be called.

Returns:String

The procedure name.

getRegisteredParametersback to summary
public List<ParameterRegistration<T>> getRegisteredParameters()

Retrieve all registered parameters.

Returns:List<ParameterRegistration<T>>

The (immutable) list of all registered parameters.

registerParameterback to summary
public <T> ParameterRegistration<T> registerParameter(int position, Class<T> type, ParameterMode mode)

Basic form for registering a positional parameter.

Parameters
<T>
The parameterized Java type of the parameter.
position:int

The position

type:Class<T>

The Java type of the parameter

mode:ParameterMode

The parameter mode (in, out, inout)

Returns:ParameterRegistration<T>

The parameter registration memento

registerParameterback to summary
public <T> ParameterRegistration<T> registerParameter(String parameterName, Class<T> type, ParameterMode mode) throws NamedParametersNotSupportedException

Basic form for registering a named parameter.

Parameters
<T>
The parameterized Java type of the parameter.
parameterName:String

The parameter name

type:Class<T>

The Java type of the parameter

mode:ParameterMode

The parameter mode (in, out, inout)

Returns:ParameterRegistration<T>

The parameter registration memento

Exceptions
NamedParametersNotSupportedException:
When the underlying database is known to not support named procedure parameters.
registerParameter0back to summary
public ProcedureCall registerParameter0(int position, Class<T> type, ParameterMode mode)

Deprecated

as a consequence of ProcedureCall being deprecated. See corresponding docs for further information.

Chained form of registerParameter(int, Class, javax.persistence.ParameterMode)

Parameters
position:int

The position

type:Class<T>

The Java type of the parameter

mode:ParameterMode

The parameter mode (in, out, inout)

Returns:ProcedureCall

this, for method chaining

registerParameter0back to summary
public ProcedureCall registerParameter0(String parameterName, Class<T> type, ParameterMode mode) throws NamedParametersNotSupportedException

Deprecated

as a consequence of ProcedureCall being deprecated. See corresponding docs for further information.

Chained form of registerParameter(String, Class, javax.persistence.ParameterMode)

Parameters
parameterName:String

The parameter name

type:Class<T>

The Java type of the parameter

mode:ParameterMode

The parameter mode (in, out, inout)

Returns:ProcedureCall

The parameter registration memento

Exceptions
NamedParametersNotSupportedException:
When the underlying database is known to not support named procedure parameters.