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

public Class ProcedureCallImpl<R>

extends AbstractProducedQuery<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, org.hibernate.query.CommonQueryContract, org.hibernate.BasicQueryContract, org.hibernate.Query, javax.persistence.TypedQuery, javax.persistence.Query, org.hibernate.procedure.ProcedureCall, javax.persistence.StoredProcedureQuery, org.hibernate.SynchronizeableQuery
Imports
java.sql.CallableStatement, .SQLException, java.util.ArrayList, .Arrays, .Calendar, .Collections, .Date, .HashSet, .List, .Map, .Set, java.util.function.Consumer, java.util.stream.Stream, javax.persistence.FlushModeType, .LockModeType, .NoResultException, .NonUniqueResultException, .Parameter, .ParameterMode, .TemporalType, org.hibernate.HibernateException, org.hibernate.engine.ResultSetMappingDefinition, org.hibernate.engine.query.spi.sql.NativeSQLQueryReturn, org.hibernate.engine.spi.QueryParameters, .SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.StringHelper, org.hibernate.jpa.TypedParameterValue, org.hibernate.persister.entity.EntityPersister, org.hibernate.procedure.NoSuchParameterException, .ParameterRegistration, .ParameterStrategyException, .ProcedureCall, .ProcedureCallMemento, .ProcedureOutputs, org.hibernate.procedure.spi.ParameterRegistrationImplementor, .ParameterStrategy, .ProcedureCallImplementor, org.hibernate.query.QueryParameter, org.hibernate.query.internal.AbstractProducedQuery, org.hibernate.query.procedure.internal.ProcedureParamBindings, .ProcedureParameterImpl, .ProcedureParameterMetadata, org.hibernate.query.procedure.spi.ProcedureParameterImplementor, org.hibernate.query.spi.QueryParameterBinding, .QueryParameterBindings, org.hibernate.result.NoMoreReturnsException, .Output, .ResultSetOutput, .UpdateCountOutput, org.hibernate.result.spi.ResultContext, org.hibernate.type.Type, org.jboss.logging.Logger

Deprecated

as a consequence of AbstractProducedQuery and ProcedureCallImplementor being deprecated. See corresponding docs for further information.

Standard implementation of org.hibernate.procedure.ProcedureCall
Authors
Steve Ebersole, Yanming Zhou

Field Summary

Modifier and TypeField and Description
private final boolean
private static final CoreMessageLogger
private static final NativeSQLQueryReturn[]
private ProcedureOutputsImpl
private final ProcedureParamBindings
private final ProcedureParameterMetadata
private final String
private ProcedureOutputs
private final NativeSQLQueryReturn[]
private Set<String>

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(final SharedSessionContractImplementor
The session
session
,
String
The name of the procedure to call
procedureName
,
Class<T>...
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
resultSetMappings
)

The result-set-mapping(s) return form

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

The named/stored copy constructor

Method Summary

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

Implements org.hibernate.procedure.ProcedureCall.addSynchronizedEntityClass.

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

Implements org.hibernate.procedure.ProcedureCall.addSynchronizedEntityName.

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

Implements org.hibernate.procedure.ProcedureCall.addSynchronizedQuerySpace.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Adds a query space.
protected void
private ProcedureOutputsImpl
public ParameterRegistrationImplementor<T>[]

Returns:

The collected REF_CURSOR type parameters.
collectRefCursorParameters
()

Collects any parameter registrations which indicate a REF_CURSOR parameter type/mode.

public boolean
execute()

Implements javax.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.
public int
executeUpdate()

Overrides org.hibernate.query.internal.AbstractProducedQuery.executeUpdate.

Implements javax.persistence.StoredProcedureQuery.executeUpdate, javax.persistence.Query.executeUpdate.

Return the update count of -1 if there is no pending result or if the first result is not an update count.
public ProcedureCallMemento
extractMemento(Map<String, Object>
The hints to incorporate into the memento
hints
)

Implements org.hibernate.procedure.ProcedureCall.extractMemento.

Extract the disconnected representation of this call.
public ProcedureCallMemento
extractMemento()

Implements org.hibernate.procedure.ProcedureCall.extractMemento.

Extract the disconnected representation of this call.
public LockModeType
public Object
getOutputParameterValue(int
parameter position
position
)

Implements javax.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 javax.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 ProcedureParameterMetadata
public ParameterRegistrationImplementor<T>
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 ParameterRegistrationImplementor<T>
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 to be called.
public QueryParameterBindings
public QueryParameters
public NativeSQLQueryReturn[]
public String
getQueryString()

Implements org.hibernate.query.Query.getQueryString.

Get the query string.
public List<E>
public List<R>
getResultList()

Overrides default org.hibernate.procedure.spi.ProcedureCallImplementor.getResultList, org.hibernate.query.Query.getResultList.

Retrieve the list of results from the next result set.
public Stream<T>
getResultStream()

Overrides default javax.persistence.Query.getResultStream, org.hibernate.query.Query.getResultStream.

Execute a SELECT query and return the query results as an untyped java.util.stream.Stream.
public String[]
public Type[]
getReturnTypes()

Implements org.hibernate.BasicQueryContract.getReturnTypes, org.hibernate.Query.getReturnTypes.

Return the Hibernate types of the query results.
public SharedSessionContractImplementor
public R
public String
public Set<String>
public int
getUpdateCount()

Implements javax.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 javax.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.
protected boolean
isNativeQuery()

Implements abstract org.hibernate.query.internal.AbstractProducedQuery.isNativeQuery.

Is the query represented here a native (SQL) query?
protected ProcedureOutputs
public <T> ParameterRegistration<T>
registerParameter(int
The position
position
,
Class<T>
The Java type of the parameter
type
,
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> ParameterRegistration<T>
registerParameter(String
The parameter name
name
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter.

Basic form for registering a named parameter.
public ProcedureCall
registerParameter0(int
The position
position
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter0.

Deprecated as a consequence of ProcedureCall being deprecated.
Chained form of registerParameter(int, Class, javax.persistence.ParameterMode)
public ProcedureCall
registerParameter0(String
The parameter name
name
,
Class<T>
The Java type of the parameter
type
,
ParameterMode
The parameter mode (in, out, inout)
mode
)

Implements org.hibernate.procedure.ProcedureCall.registerParameter0.

Deprecated as a consequence of ProcedureCall being deprecated.
Chained form of registerParameter(String, Class, javax.persistence.ParameterMode)
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.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
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.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Register a named parameter.
public ProcedureCallImplementor<R>
setEntity(int
the position of the parameter in the query string, numbered from 0.
position
,
Object
a non-null instance of a persistent class
val
)

Implements org.hibernate.query.Query.setEntity.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of a mapped persistent class to a JDBC-style query parameter.
public ProcedureCallImplementor<R>
setEntity(String
the name of the parameter
name
,
Object
a non-null instance of a persistent class
val
)

Implements org.hibernate.query.Query.setEntity.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of a mapped persistent class to a named query parameter.
public ProcedureCallImplementor<R>
setFlushMode(FlushModeType
flush mode
flushModeType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setFlushMode.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setFlushMode, org.hibernate.query.Query.setFlushMode.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Set the flush mode type to be used for the query execution.
public ProcedureCallImplementor<R>
setHint(String
name of the property or hint
hintName
,
Object
value for the property or hint
value
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setHint.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setHint, org.hibernate.query.Query.setHint.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Set a query property or hint.
public ProcedureCallImplementor<R>
setLockMode(LockModeType
lock mode
lockMode
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setLockMode.

Implements javax.persistence.Query.setLockMode, org.hibernate.query.Query.setLockMode.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Set the lock mode type to be used for the query execution.
public <P> ProcedureCallImplementor<R>
setParameter(QueryParameter<P>
The query parameter memento
parameter
,
P
the possibly-null parameter value
value
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a query parameter using its inferred Type.
public <P> ProcedureCallImplementor<R>
setParameter(Parameter<P>
parameter object
parameter
,
P
parameter value
value
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind the value of a Parameter object.
public ProcedureCallImplementor<R>
setParameter(String
parameter name
name
,
Object
parameter value
value
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an argument value to a named parameter.
public ProcedureCallImplementor<R>
setParameter(int
position
position
,
Object
parameter value
value
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an argument value to a positional parameter.
public <P> ProcedureCallImplementor<R>
setParameter(QueryParameter<P>
The query parameter memento
parameter
,
P
the possibly-null parameter value
value
,
Type
the Hibernate type
type
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a query parameter using the supplied Type
public ProcedureCallImplementor<R>
setParameter(String
the name of the parameter
name
,
Object
the possibly-null parameter value
value
,
Type
the Hibernate type
type
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a named query parameter using the supplied Type
public ProcedureCallImplementor<R>
setParameter(int
the position of the parameter in the query string, numbered from 0.
position
,
Object
the possibly-null parameter value
value
,
Type
the Hibernate type
type
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a value to a JDBC-style query parameter.
public <P> ProcedureCallImplementor<R>
setParameter(QueryParameter<P>
The query parameter memento
parameter
,
P
the possibly-null parameter value
value
,
TemporalType
the temporal-type to use in binding the date/time
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a query parameter as some form of date/time using the indicated temporal-type.
public ProcedureCallImplementor<R>
setParameter(String
the parameter name
name
,
Object
the possibly-null parameter value
value
,
TemporalType
the temporal-type to use in binding the date/time
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a named query parameter as some form of date/time using the indicated temporal-type.
public ProcedureCallImplementor<R>
setParameter(int
the position of the parameter in the query string, numbered from 0.
position
,
Object
the possibly-null parameter value
value
,
TemporalType
the temporal-type to use in binding the date/time
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind a positional query parameter as some form of date/time using the indicated temporal-type.
public ProcedureCallImplementor<R>
setParameter(Parameter<T>
parameter object
parameter
,
Calendar
parameter value
value
,
TemporalType
temporal type
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of java.util.Calendar to a Parameter object.
public ProcedureCallImplementor<R>
setParameter(Parameter<T>
parameter object
parameter
,
Date
parameter value
value
,
TemporalType
temporal type
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of java.util.Date to a Parameter object.
public ProcedureCallImplementor<R>
setParameter(String
parameter name
name
,
Calendar
parameter value
value
,
TemporalType
temporal type
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of java.util.Calendar to a named parameter.
public ProcedureCallImplementor<R>
setParameter(String
parameter name
name
,
Date
parameter value
value
,
TemporalType
temporal type
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of java.util.Date to a named parameter.
public ProcedureCallImplementor<R>
setParameter(int
position
position
,
Calendar
parameter value
value
,
TemporalType
temporal type
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of java.util.Calendar to a positional parameter.
public ProcedureCallImplementor<R>
setParameter(int
position
position
,
Date
parameter value
value
,
TemporalType
temporal type
temporalType
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.setParameter.

Implements org.hibernate.procedure.spi.ProcedureCallImplementor.setParameter, org.hibernate.query.Query.setParameter, org.hibernate.query.Query.setParameter.

Deprecated as a consequence of ProcedureCallImplementor being deprecated.
Bind an instance of java.util.Date to a positional parameter.
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)

private static List<ProcedureCallMementoImpl.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
)

Overrides org.hibernate.query.internal.AbstractProducedQuery.unwrap.

Implements javax.persistence.Query.unwrap.

Return an object of the specified type to allow access to the provider-specific API.
Inherited from org.hibernate.query.internal.AbstractProducedQuery:
addQueryHintafterQueryappendQueryPlanToQueryParametersapplyAliasSpecificLockModeHintapplyCacheableHintapplyCacheModeHintapplyCacheRegionHintapplyCommentHintapplyEntityGraphQueryHintapplyFetchSizeHintapplyFlushModeHintapplyFollowOnLockingHintapplyGraphapplyHibernateLockModeHintapplyJpaCacheRetrieveModeapplyJpaCacheStoreModeapplyLockModeTypeHintapplyLockTimeoutHintapplyNativeQueryLockModeapplyPassDistinctThroughapplyQuerySpacesapplyReadOnlyHintapplyTimeoutHintbeforeQuerycanApplyAliasSpecificLockModeHintscollectBaselineHintscollectHintsdetermineProperBooleanTypedetermineProperBooleanTypedetermineTypedoExecuteUpdatedoIteratedoListdoScrollgetCacheModegetCacheRegiongetCommentgetExceptionConvertergetFetchSizegetFirstResultgetFlushModegetHibernateFlushModegetHintsgetLockOptionsgetMaxResultsgetNamedParameterMapgetNamedParametersgetParametergetParametergetParametergetParametergetParametersgetParameterValuegetParameterValuegetParameterValuegetPositionalParameterTypesgetPositionalParameterValuesgetProducergetQueryOptionsgetSupportedHintsgetTimeouthandleUnrecognizedHintisBoundisCacheableisCallableisReadOnlyisSelectiteratelistmakeQueryParametersForExecutionputIfNotNullputIfNotNullresolveEntityNamescrollscrollsetCacheablesetCacheModesetCacheRegionsetCommentsetFetchSizesetFirstResultsetFlushModesetHibernateFlushModesetLockModesetLockOptionssetMaxResultssetOptionalEntityNamesetOptionalIdsetOptionalObjectsetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParametersetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetParameterListsetPropertiessetPropertiessetReadOnlysetResultTransformersetTimeoutstreamuniqueElementuniqueResultuniqueResultOptional