Top Description Fields Constructors Methods
org.hibernate.procedure.internal

public Class ProcedureCallImpl<R>

extends AbstractQuery<R>
implements ProcedureCallImplementor<R>, ResultContext
Class Inheritance
All Implemented Interfaces
org.hibernate.result.spi.ResultContext, org.hibernate.procedure.spi.ProcedureCallImplementor, org.hibernate.query.spi.QueryImplementor, org.hibernate.query.Query, jakarta.persistence.TypedQuery, jakarta.persistence.Query, org.hibernate.query.MutationQuery, org.hibernate.query.CommonQueryContract, org.hibernate.query.SelectionQuery, org.hibernate.procedure.ProcedureCall, java.lang.AutoCloseable, org.hibernate.query.named.NameableQuery, jakarta.persistence.StoredProcedureQuery, org.hibernate.query.SynchronizeableQuery
Imports
java.sql.CallableStatement, .SQLException, .Types, java.util.ArrayList, .Arrays, .Calendar, .Collections, .Date, .HashSet, .IdentityHashMap, .List, .Map, .Set, java.util.stream.Stream, org.hibernate.HibernateException, .LockMode, .LockOptions, .ScrollMode, org.hibernate.engine.spi.SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.graph.GraphSemantic, .RootGraph, org.hibernate.graph.spi.RootGraphImplementor, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.CollectionHelper, org.hibernate.metamodel.mapping.JdbcMapping, org.hibernate.persister.entity.EntityPersister, org.hibernate.procedure.NoSuchParameterException, .ParameterStrategyException, .ProcedureCall, .ProcedureOutputs, org.hibernate.procedure.spi.CallableStatementSupport, .FunctionReturnImplementor, .NamedCallableQueryMemento, .ParameterStrategy, .ProcedureCallImplementor, .ProcedureParameterImplementor, org.hibernate.query.BindableType, .Order, .OutputableType, .Query, .QueryParameter, org.hibernate.query.internal.QueryOptionsImpl, org.hibernate.query.procedure.ProcedureParameter, org.hibernate.query.results.ResultSetMapping, org.hibernate.query.spi.AbstractQuery, .MutableQueryOptions, .QueryImplementor, .QueryParameterBinding, .QueryParameterBindings, .ScrollableResultsImplementor, org.hibernate.query.sqm.SqmExpressible, org.hibernate.result.NoMoreReturnsException, .Output, .ResultSetOutput, .UpdateCountOutput, org.hibernate.result.internal.OutputsExecutionContext, org.hibernate.result.spi.ResultContext, org.hibernate.sql.ast.tree.expression.JdbcParameter, org.hibernate.sql.exec.internal.JdbcCallRefCursorExtractorImpl, .JdbcParameterBindingImpl, .JdbcParameterBindingsImpl, org.hibernate.sql.exec.spi.ExecutionContext, .JdbcCallParameterRegistration, .JdbcCallRefCursorExtractor, .JdbcOperationQueryCall, .JdbcParameterBinder, .JdbcParameterBindings, org.hibernate.sql.results.NoMoreOutputsException, org.hibernate.type.BasicType, .BasicTypeReference, org.hibernate.type.spi.TypeConfiguration, org.jboss.logging.Logger, jakarta.persistence.FlushModeType, .LockModeType, .NoResultException, .NonUniqueResultException, .Parameter, .ParameterMode, .PersistenceException, .TemporalType, .TransactionRequiredException

Standard implementation of ProcedureCall
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private FunctionReturnImpl<R>
private static final Logger
private ProcedureOutputsImpl
private final ProcedureParamBindings
private final ProcedureParameterMetadataImpl
private final String
private ProcedureOutputs
private final QueryOptionsImpl
private final ResultSetMapping
private Set<String>
Inherited from org.hibernate.query.spi.AbstractQuery:
log

Constructor Summary

AccessConstructor and Description
public
ProcedureCallImpl(SharedSessionContractImplementor
The session
session
,
String
The name of the procedure to call
procedureName
)

The no-returns form.

public
ProcedureCallImpl(SharedSessionContractImplementor
The session
session
,
String
The name of the procedure to call
procedureName
,
Class<?>...
The classes making up the result
resultClasses
)

The result Class(es) return form

public
ProcedureCallImpl(final SharedSessionContractImplementor
The session
session
,
String
The name of the procedure to call
procedureName
,
String...
The names of the result set mappings making up the result
resultSetMappingNames
)

The result-set-mapping(s) return form

pack-priv
ProcedureCallImpl(SharedSessionContractImplementor
The session
session
,
NamedCallableQueryMemento
The named/stored memento
memento
)

The named/stored copy constructor

pack-priv
ProcedureCallImpl(SharedSessionContractImplementor
The session
session
,
NamedCallableQueryMemento
The named/stored memento
memento
,
Class<?>... resultTypes)

The named/stored copy constructor

public

Method Summary

Modifier and TypeMethod and Description
public ProcedureCallImplementor<R>
addSynchronizedEntityClass(Class<T>
The class of the entity.
entityClass
)

Implements org.hibernate.procedure.ProcedureCall.addSynchronizedEntityClass.

Add all query spaces associated with the entity with the given type.
public ProcedureCallImplementor<R>
addSynchronizedEntityName(String
The name of an entity.
entityName
)

Implements org.hibernate.procedure.ProcedureCall.addSynchronizedEntityName.

Add all query spaces associated with the entity with the given names.
public ProcedureCallImplementor<R>
addSynchronizedQuerySpace(String
The name of the query space, usually the name of a database table.
querySpace
)

Implements org.hibernate.procedure.ProcedureCall.addSynchronizedQuerySpace.

Add a query space.
protected void
private void
protected void
public Query<R>
applyGraph(RootGraph<J>
The graph to apply.
graph
,
GraphSemantic
The semantic to use when applying the graph
semantic
)

Implements org.hibernate.query.Query.applyGraph.

Apply the given graph using the given semantic
protected void
private ProcedureOutputsImpl
protected int
protected List<R>
protected ScrollableResultsImplementor<R>
public boolean
execute()

Implements jakarta.persistence.StoredProcedureQuery.execute.

Return true if the first result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.
private <T> Class<T>
public FunctionReturnImplementor<R>
public LockModeType
public Object
getOutputParameterValue(int
parameter position
position
)

Implements jakarta.persistence.StoredProcedureQuery.getOutputParameterValue.

Retrieve a value passed back from the procedure through an INOUT or OUT parameter.
public Object
getOutputParameterValue(String
name of the parameter as registered or specified in metadata
parameterName
)

Implements jakarta.persistence.StoredProcedureQuery.getOutputParameterValue.

Retrieve a value passed back from the procedure through an INOUT or OUT parameter.
public ProcedureOutputs
getOutputs()

Implements org.hibernate.procedure.ProcedureCall.getOutputs.

Retrieves access to outputs of this procedure call.
public QueryParameterBindings
public ProcedureParameterMetadataImpl
public ProcedureParameterImplementor<?>
getParameterRegistration(int
The parameter position
position
)

Implements org.hibernate.procedure.ProcedureCall.getParameterRegistration.

Retrieve a previously registered parameter memento by the position under which it was registered.
public ProcedureParameterImplementor<?>
getParameterRegistration(String
The parameter name
name
)

Implements org.hibernate.procedure.ProcedureCall.getParameterRegistration.

Retrieve a previously registered parameter memento by the name under which it was registered.
public ParameterStrategy
public String
getProcedureName()

Implements org.hibernate.procedure.ProcedureCall.getProcedureName.

Get the name of the stored procedure (or function) to be called.
public MutableQueryOptions
public QueryParameterBindings
public String
getQueryString()

Implements abstract org.hibernate.query.spi.AbstractSelectionQuery.getQueryString.

Implements org.hibernate.query.Query.getQueryString.

The query as a string, or null in the case of a criteria query.
public List<E>
public List<R>
public ResultSetMapping
public Stream<R>
public SessionFactoryImplementor
public R
public R
getSingleResultOrNull()

Overrides org.hibernate.query.spi.AbstractSelectionQuery.getSingleResultOrNull.

Implements org.hibernate.query.SelectionQuery.getSingleResultOrNull.

Execute the query and return the single result of the query, or null if the query returns no results.
public Set<String>
public int
getUpdateCount()

Implements jakarta.persistence.StoredProcedureQuery.getUpdateCount.

Return the update count or -1 if there is no pending result or if the next result is not an update count.
public boolean
hasMoreResults()

Implements jakarta.persistence.StoredProcedureQuery.hasMoreResults.

Return true if the next result corresponds to a result set, and false if it is an update count or if there are no results other than through INOUT and OUT parameters, if any.
public boolean
isFunctionCall()

Implements org.hibernate.procedure.ProcedureCall.isFunctionCall.

Does this ProcedureCall represent a call to a database FUNCTION, as opposed to a PROCEDURE?
public ProcedureCallImpl<R>
markAsFunctionCall(int
The java.sql.Types code for the function return
sqlType
)

Implements org.hibernate.procedure.ProcedureCall.markAsFunctionCall.

Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.
public ProcedureCallImpl<R>
markAsFunctionCall(Class<?>
The result type for the function return
resultType
)

Implements org.hibernate.procedure.ProcedureCall.markAsFunctionCall.

Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.
public ProcedureCallImpl<R>
markAsFunctionCall(BasicTypeReference<?>
The result type for the function return
typeReference
)

Implements org.hibernate.procedure.ProcedureCall.markAsFunctionCall.

Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.
private ProcedureCallImpl<R>
protected ProcedureOutputs
public <T> ProcedureParameter<T>
registerParameter(int
The position
position
,
Class<T>
The Java type of the parameter
javaType
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter.

Basic form for registering a positional parameter.
public <T> ProcedureParameter<T>
registerParameter(int
The position
position
,
BasicTypeReference<T>
The type reference of the parameter type
typeReference
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter.

Basic form for registering a positional parameter.
private void
public <T> ProcedureParameterImplementor<T>
registerParameter(String
The parameter name
name
,
Class<T>
The Java type of the parameter
javaType
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter.

Basic form for registering a named parameter.
public <T> ProcedureParameterImplementor<T>
registerParameter(String
The parameter name
name
,
BasicTypeReference<T>
The type reference of the parameter type
typeReference
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter.

Basic form for registering a named parameter.
public ProcedureCallImplementor<R>
registerStoredProcedureParameter(int
parameter position
position
,
Class<T>
type of the parameter
type
,
ParameterMode
parameter mode
mode
)

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.registerStoredProcedureParameter.

Register a positional parameter.
public ProcedureCallImplementor<R>
registerStoredProcedureParameter(String
name of the parameter as registered or specified in metadata
parameterName
,
Class<T>
type of the parameter
type
,
ParameterMode
parameter mode
mode
)

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.registerStoredProcedureParameter.

Register a named parameter.
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ScrollableResultsImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public QueryImplementor<R>
setLockMode(String
A query alias
alias
,
LockMode
The lock mode to apply
lockMode
)

Overrides org.hibernate.query.spi.AbstractQuery.setLockMode.

Implements org.hibernate.query.Query.setLockMode, org.hibernate.query.SelectionQuery.setLockMode.

Set the LockMode to use for particular alias defined in the FROM clause of the query.
public ProcedureCallImplementor<R>
public QueryImplementor<R>
setLockOptions(LockOptions
The lock options to apply to the query.
lockOptions
)

Overrides org.hibernate.query.spi.AbstractQuery.setLockOptions.

Implements org.hibernate.query.Query.setLockOptions.

Apply the given lock options to this query.
public Query<R>
setOrder(List<Order<? super R>>
one or more instances of Order
orderList
)

Overrides org.hibernate.query.spi.AbstractQuery.setOrder.

Implements org.hibernate.query.Query.setOrder, org.hibernate.query.SelectionQuery.setOrder.

If the result type of this query is an entity class, add one or more rules for ordering the query results.
public Query<R>
setOrder(Order<? super R>
an instance of Order
order
)

Overrides org.hibernate.query.spi.AbstractQuery.setOrder.

Implements org.hibernate.query.Query.setOrder, org.hibernate.query.SelectionQuery.setOrder.

If the result type of this query is an entity class, add a rule for ordering the query results.
public <P> ProcedureCallImplementor<R>
setParameter(QueryParameter<P>
the query parameter memento
parameter
,
P
the argument, which might be null
value
)

Overrides org.hibernate.query.spi.AbstractQuery.setParameter.

Implements org.hibernate.query.CommonQueryContract.setParameter, org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.SelectionQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter.
public <P> ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public <P> ProcedureCallImplementor<R>
setParameter(QueryParameter<P>
the query parameter memento
parameter
,
P
the argument, which might be null
value
,
BindableType<P>
a BindableType representing the type of the parameter
type
)

Overrides org.hibernate.query.spi.AbstractQuery.setParameter.

Implements org.hibernate.query.CommonQueryContract.setParameter, org.hibernate.query.spi.QueryImplementor.setParameter, org.hibernate.query.SelectionQuery.setParameter.

Bind an argument to the query parameter represented by the given QueryParameter, using the given BindableType.
public <P> ProcedureCallImplementor<R>
public <P> ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public ProcedureCallImplementor<R>
public Stream<T>
protected Set<String>

Returns:

The spaces
synchronizedQuerySpaces
()

Use this form instead of getSynchronizedQuerySpaces() when you want to make sure the underlying Set is instantiated (aka, on add)

public NamedCallableQueryMemento
toMemento(String name)

Implements org.hibernate.procedure.ProcedureCall.toMemento.

Convert the query into the memento
private static List<NamedCallableQueryMemento.ParameterMemento>
public <T> T
unwrap(Class<T>
the class of the object to be returned. This is normally either the underlying query implementation class or an interface that it implements.
cls
)

Implements jakarta.persistence.Query.unwrap.

Return an object of the specified type to allow access to the provider-specific API.
Inherited from org.hibernate.query.spi.AbstractQuery:
addQueryHintapplyOptionscollectHintsdisableFetchProfileenableFetchProfileexecuteUpdategetCommentgetFirstResultgetFlushModegetLockOptionsgetMaxResultsgetParametersgetSupportedHintsisCacheableprepareForExecutionresolveJdbcParameterTypeIfNecessarysetCacheablesetCacheModesetCacheRegionsetCacheRetrieveModesetCacheStoreModesetCommentsetEntityGraphsetFetchSizesetFirstResultsetHibernateFlushModesetMaxResultssetOptionalEntityNamesetOptionalIdsetOptionalObjectsetParametersetParametersetParametersetParametersetParametersetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetPropertiessetPropertiessetQueryPlanCacheablesetReadOnlysetResultListTransformersetTimeoutsetTupleTransformer