Package org.hibernate.procedure
Interface ParameterRegistration<T>
-
- All Superinterfaces:
Parameter<T>
,ProcedureParameter<T>
,QueryParameter<T>
- All Known Subinterfaces:
ParameterRegistrationImplementor<T>
,ProcedureParameterImplementor<T>
public interface ParameterRegistration<T> extends ProcedureParameter<T>
Describes a registered procedure/function parameter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
bindValue(T value)
Bind a value to the parameter.void
bindValue(T value, TemporalType explicitTemporalType)
Bind a value to the parameter, using just a specified portion of the DATE/TIME value.void
enablePassingNulls(boolean enabled)
Controls how unbound values for this IN/INOUT parameter registration will be handled prior to execution.ParameterBind<T>
getBind()
Retrieve the binding associated with this parameter.ParameterMode
getMode()
Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter? An OUTPUT parameter? etc).java.lang.String
getName()
The name under which this parameter was registered.java.lang.Integer
getPosition()
The position at which this parameter was registered.default java.lang.Class<T>
getType()
Deprecated.CallParameter.getParameterType()
instead.void
setHibernateType(Type type)
Set the Hibernate mapping type for this parameter.-
Methods inherited from interface javax.persistence.Parameter
getParameterType
-
Methods inherited from interface org.hibernate.query.procedure.ProcedureParameter
isPassNullsEnabled
-
Methods inherited from interface org.hibernate.query.QueryParameter
getHibernateType, getSourceLocations
-
-
-
-
Method Detail
-
getName
java.lang.String getName()
The name under which this parameter was registered. Can benull
which should indicate that positional registration was used (and thereforegetPosition()
should return non-null.
-
getPosition
java.lang.Integer getPosition()
The position at which this parameter was registered. Can benull
which should indicate that named registration was used (and thereforegetName()
should return non-null).- Specified by:
getPosition
in interfaceParameter<T>
- Returns:
- The name;
-
getType
@Deprecated default java.lang.Class<T> getType()
Deprecated.CallParameter.getParameterType()
instead.Return the Java type of the parameter.- Returns:
- The Java type of the parameter.
-
getMode
ParameterMode getMode()
Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter? An OUTPUT parameter? etc).- Specified by:
getMode
in interfaceProcedureParameter<T>
- Returns:
- The parameter mode.
-
enablePassingNulls
void enablePassingNulls(boolean enabled)
Controls how unbound values for this IN/INOUT parameter registration will be handled prior to execution. There are 2 possible options to handle it:- bind the NULL to the parameter
- do not bind the NULL to the parameter
AvailableSettings.PROCEDURE_NULL_PARAM_PASSING
- Specified by:
enablePassingNulls
in interfaceProcedureParameter<T>
- Parameters:
enabled
-true
indicates that the NULL should be passed;false
indicates it should not.- See Also:
enablePassingNulls(boolean)
-
setHibernateType
void setHibernateType(Type type)
Set the Hibernate mapping type for this parameter.- Parameters:
type
- The Hibernate mapping type.
-
getBind
ParameterBind<T> getBind()
Retrieve the binding associated with this parameter. The binding is only relevant for INPUT parameters. Can returnnull
if nothing has been bound yet. To bind a value to the parameter use one of thebindValue(T)
methods.- Returns:
- The parameter binding
-
bindValue
void bindValue(T value)
Bind a value to the parameter. How this value is bound to the underlying JDBC CallableStatement is totally dependent on the Hibernate type.- Parameters:
value
- The value to bind.
-
bindValue
void bindValue(T value, TemporalType explicitTemporalType)
Bind a value to the parameter, using just a specified portion of the DATE/TIME value. It is illegal to call this form if the parameter is not DATE/TIME type. The Hibernate type is circumvented in this case and an appropriate "precision" Type is used instead.- Parameters:
value
- The value to bindexplicitTemporalType
- An explicitly supplied TemporalType.
-
-