Note that here we use the terms "procedure" and "function" as follows:
{call procedureName(...)}{? = call functionName(...)}
Unless explicitly specified, the ProcedureCall is assumed to follow the
procedure call syntax. To explicitly specify that this should be a function
call, use markAsFunctionCall. JPA users could either:
storedProcedureQuery.unwrap( ProcedureCall.class .markAsFunctionCall()FUNCTION_RETURN_TYPE_HINT hint (avoids casting to Hibernate-specific classes)When using function-call syntax:
In some cases, based on the Dialect, we will have other validations and assumptions as well. For example, on PGSQL, whenever we see a REF_CURSOR mode parameter, we know that:
markAsFunctionCall implicitly) because
that is the only way PGSQL supports returning REF_CURSOR results.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | FUNCTION_RETURN_TYPE_HINT
The hint key (for use with JPA's "hint system") indicating the function's return JDBC type code
(aka, |
| Modifier and Type | Method and Description |
|---|---|
| public ProcedureCall | addSynchronizedEntityClass(Class<T>
The class of the entity. entityClass)Redeclares org. |
| public ProcedureCall | addSynchronizedEntityName(String
The name of an entity. entityName)Redeclares org. |
| public ProcedureCall | addSynchronizedQuerySpace(String
The name of the query space, usually the name of a database table. querySpace)Redeclares org. |
| public default void | close()
Implements java. java.
|
| public ProcedureOutputs | Returns: The ProcedureOutputs representationRetrieves access to outputs of this procedure call. |
| public ProcedureParameter | Returns: The parameter registration mementoThe parameter position position)Retrieve a previously registered parameter memento by the position under which it was registered. |
| public ProcedureParameter | Returns: The parameter registration mementoThe parameter name name)Retrieve a previously registered parameter memento by the name under which it was registered. |
| public String | Returns: The procedure name.Get the name of the stored procedure (or function) to be called. |
| public List | Returns: The (immutable) list of all registered parameters.Retrieve all registered parameters. |
| public boolean | Returns: true indicates that this ProcedureCall represents a
function call; false indicates a procedure call.Does this |
| public ProcedureCall | Returns: this, for method chainingThe sqlType)java. code for the function returnMark this ProcedureCall as representing a call to a database function, rather than a database procedure. |
| public ProcedureCall | Returns: this, for method chainingThe result type for the function return resultType)Mark this ProcedureCall as representing a call to a database function, rather than a database procedure. |
| public ProcedureCall | Returns: this, for method chainingThe result type for the function return typeReference)Mark this ProcedureCall as representing a call to a database function, rather than a database procedure. |
| public < The parameterized Java type of the parameter. T> ProcedureParameter | Returns: The parameter registration mementoThe 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> ProcedureParameter | Returns: The parameter registration mementoThe position position, BasicTypeReference<T> The type reference of the parameter type 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> ProcedureParameter | Returns: The parameter registration mementoThe 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 < The parameterized Java type of the parameter. T> ProcedureParameter | Returns: The parameter registration mementoThe parameter name parameterName, BasicTypeReference<T> The type reference of the parameter type type, ParameterMode The parameter mode (in, out, inout) mode)Basic form for registering a named parameter. |
| public ProcedureCall | registerStoredProcedureParameter(int position, BasicTypeReference<?> type, ParameterMode mode)
Like |
| public ProcedureCall | registerStoredProcedureParameter(String parameterName, BasicTypeReference<?> type, ParameterMode mode)
Like |
| public ProcedureCall | registerStoredProcedureParameter(int
parameter position position, Class<T> type of the parameter type, ParameterMode parameter mode mode)Redeclares jakarta. |
| public ProcedureCall | registerStoredProcedureParameter(String
name of the parameter as registered or
specified in metadata parameterName, Class<T> type of the parameter type, ParameterMode parameter mode mode)Redeclares jakarta. |
| public ProcedureCall | setFlushMode(FlushModeType
flush mode flushMode)Redeclares org. FlushMode in to use for this query.
|
| public ProcedureCall | setHint(String
name of the property or hint hintName, Object value for the property or hint value)Redeclares org. |
| public <T> ProcedureCall | setParameter(Parameter<T>
parameter object param, T parameter value value)Redeclares org. Parameter object.
|
| public ProcedureCall | setParameter(Parameter<Calendar>
parameter object param, Calendar parameter value value, TemporalType temporal type temporalType)Redeclares org. java.util.Calendar to a Parameter object.
|
| public ProcedureCall | setParameter(Parameter<Date>
parameter object param, Date parameter value value, TemporalType temporal type temporalType)Redeclares org. java.util.Date to a Parameter object.
|
| public ProcedureCall | setParameter(String
parameter name name, Object parameter value value)Redeclares org. |
| public ProcedureCall | setParameter(String
parameter name name, Calendar parameter value value, TemporalType temporal type temporalType)Redeclares org. java.util.Calendar to a named parameter.
|
| public ProcedureCall | setParameter(String
parameter name name, Date parameter value value, TemporalType temporal type temporalType)Redeclares org. java.util.Date to a named parameter.
|
| public ProcedureCall | setParameter(int
position position, Object parameter value value)Redeclares org. |
| public ProcedureCall | setParameter(int
position position, Calendar parameter value value, TemporalType temporal type temporalType)Redeclares org. java.util.Calendar to a positional
parameter.
|
| public ProcedureCall | setParameter(int
position position, Date parameter value value, TemporalType temporal type temporalType)Redeclares org. java.util.Date to a positional parameter.
|
| public NamedCallableQueryMemento | toMemento(String name)
Redeclares org. |
| FUNCTION_RETURN_TYPE_HINT | back to summary |
|---|---|
| public static final String FUNCTION_RETURN_TYPE_HINT The hint key (for use with JPA's "hint system") indicating the function's return JDBC type code
(aka, | |
| addSynchronizedEntityClass | back to summary |
|---|---|
| public ProcedureCall addSynchronizedEntityClass(Class<T> entityClass) throws MappingException Redeclares org. Doc from org. Add all query spaces associated with the entity with the given type.
Same as
| |
| addSynchronizedEntityName | back to summary |
|---|---|
| public ProcedureCall addSynchronizedEntityName(String entityName) throws MappingException Redeclares org. Doc from org. Add all query spaces associated with the entity with the given names.
Same as
| |
| addSynchronizedQuerySpace | back to summary |
|---|---|
| public ProcedureCall addSynchronizedQuerySpace(String querySpace) Redeclares org. Doc from org. Add a query space. The effect of this call is to:
| |
| close | back to summary |
|---|---|
| public default void close() Implements java. Release the underlying JDBC
| |
| getOutputs | back 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.
| |
| getParameterRegistration | back to summary |
|---|---|
| public ProcedureParameter Retrieve a previously registered parameter memento by the position under which it was registered.
| |
| getParameterRegistration | back to summary |
|---|---|
| public ProcedureParameter Retrieve a previously registered parameter memento by the name under which it was registered.
| |
| getProcedureName | back to summary |
|---|---|
| public String getProcedureName() Get the name of the stored procedure (or function) to be called.
| |
| getRegisteredParameters | back to summary |
|---|---|
| public List Retrieve all registered parameters.
| |
| isFunctionCall | back to summary |
|---|---|
| public boolean isFunctionCall() Does this API Note this will only report whether this
| |
| markAsFunctionCall | back to summary |
|---|---|
| public ProcedureCall markAsFunctionCall(int sqlType) Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.
| |
| markAsFunctionCall | back to summary |
|---|---|
| public ProcedureCall markAsFunctionCall(Class<?> resultType) Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.
| |
| markAsFunctionCall | back to summary |
|---|---|
| public ProcedureCall markAsFunctionCall(BasicTypeReference<?> typeReference) Mark this ProcedureCall as representing a call to a database function, rather than a database procedure.
| |
| registerParameter | back to summary |
|---|---|
| public <T> ProcedureParameter Basic form for registering a positional parameter.
| |
| registerParameter | back to summary |
|---|---|
| public <T> ProcedureParameter Basic form for registering a positional parameter.
| |
| registerParameter | back to summary |
|---|---|
| public <T> ProcedureParameter Basic form for registering a named parameter.
| |
| registerParameter | back to summary |
|---|---|
| public <T> ProcedureParameter Basic form for registering a named parameter.
| |
| registerStoredProcedureParameter | back to summary |
|---|---|
| public ProcedureCall registerStoredProcedureParameter(int position, BasicTypeReference<?> type, ParameterMode mode) Like | |
| registerStoredProcedureParameter | back to summary |
|---|---|
| public ProcedureCall registerStoredProcedureParameter(String parameterName, BasicTypeReference<?> type, ParameterMode mode) Like | |
| registerStoredProcedureParameter | back to summary |
|---|---|
| public ProcedureCall registerStoredProcedureParameter(int position, Class<T> type, ParameterMode mode) Redeclares jakarta. Doc from jakarta. Register a positional parameter. All parameters must be registered.
| |
| registerStoredProcedureParameter | back to summary |
|---|---|
| public ProcedureCall registerStoredProcedureParameter(String parameterName, Class<T> type, ParameterMode mode) Redeclares jakarta. Doc from jakarta. Register a named parameter.
| |
| setFlushMode | back to summary |
|---|---|
| public ProcedureCall setFlushMode(FlushModeType flushMode) Redeclares org. Doc from org. Set the
| |
| setHint | back to summary |
|---|---|
| public ProcedureCall setHint(String hintName, Object value) Redeclares org. Doc from org. Set a hint. The hints understood by Hibernate are enumerated by
| |
| setParameter | back to summary |
|---|---|
| public <T> ProcedureCall setParameter(Parameter<T> param, T value) Redeclares org. Doc from jakarta. Bind the value of a
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(Parameter<Calendar> param, Calendar value, TemporalType temporalType) Redeclares org. Doc from jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(Parameter<Date> param, Date value, TemporalType temporalType) Redeclares org. Doc from jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(String name, Object value) Redeclares org. Doc from org. Bind the given argument to a named query parameter. If the type of the parameter cannot be inferred from the context in which it occurs, use one of the forms which accepts a "type".
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(String name, Calendar value, TemporalType temporalType) Redeclares org. Doc from jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(String name, Date value, TemporalType temporalType) Redeclares org. Doc from jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(int position, Object value) Redeclares org. Doc from org. Bind the given argument to an ordinal query parameter. If the type of the parameter cannot be inferred from the context in which it occurs, use one of the forms which accepts a "type".
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(int position, Calendar value, TemporalType temporalType) Redeclares org. Doc from jakarta. Bind an instance of
| |
| setParameter | back to summary |
|---|---|
| public ProcedureCall setParameter(int position, Date value, TemporalType temporalType) Redeclares org. Doc from jakarta. Bind an instance of
| |
| toMemento | back to summary |
|---|---|
| public NamedCallableQueryMemento toMemento(String name) Redeclares org. Doc from org. Convert the query into the memento
| |