Top Description Methods
org.hibernate.procedure

public Interface ParameterRegistration<T>

extends ProcedureParameter<T>
Known Direct Subinterfaces
org.hibernate.procedure.spi.ParameterRegistrationImplementor
Known Direct Implementers
org.hibernate.query.procedure.internal.ProcedureParameterImpl
Imports
javax.persistence.ParameterMode, .TemporalType, org.hibernate.query.QueryParameter, org.hibernate.query.procedure.ProcedureParameter, org.hibernate.type.Type

Describes a registered procedure/function parameter.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public void
bindValue(T
The value to bind.
value
)

Bind a value to the parameter.

public void
bindValue(T
The value to bind
value
,
TemporalType
An explicitly supplied TemporalType.
explicitTemporalType
)

Bind a value to the parameter, using just a specified portion of the DATE/TIME value.

public void
enablePassingNulls(boolean
true indicates that the NULL should be passed; false indicates it should not.
enabled
)

Redeclares org.hibernate.query.procedure.ProcedureParameter.enablePassingNulls.

Controls how unbound values for this IN/INOUT parameter registration will be handled prior to execution.
public ParameterBind<T>

Returns:

The parameter binding
getBind
()

Retrieve the binding associated with this parameter.

public ParameterMode

Returns:

The parameter mode.
getMode
()

Redeclares org.hibernate.query.procedure.ProcedureParameter.getMode.

Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter?
public String

Returns:

The name;
getName
()

Redeclares javax.persistence.Parameter.getName.

The name under which this parameter was registered.
public Integer

Returns:

The name;
getPosition
()

Redeclares javax.persistence.Parameter.getPosition.

The position at which this parameter was registered.
public default Class<T>

Returns:

The Java type of the parameter.
getType
()

Deprecated Call getParameterType() instead.
Return the Java type of the parameter.
public void
setHibernateType(Type
The Hibernate mapping type.
type
)

Set the Hibernate mapping type for this parameter.

Inherited from org.hibernate.query.procedure.ProcedureParameter:
isPassNullsEnabled

Method Detail

bindValueback to summary
public 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:T

The value to bind.

bindValueback to summary
public 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:T

The value to bind

explicitTemporalType:TemporalType

An explicitly supplied TemporalType.

enablePassingNullsback to summary
public void enablePassingNulls(boolean enabled)

Redeclares org.hibernate.query.procedure.ProcedureParameter.enablePassingNulls.

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

The reason for the distinction comes from default values defined on the corresponding database procedure/function argument. Any time a value (including NULL) is bound to the argument, its default value will not be used. So effectively this setting controls whether the NULL should be interpreted as "pass the NULL" or as "apply the argument default".

The (global) default this setting is defined by org.hibernate.cfg.AvailableSettings#PROCEDURE_NULL_PARAM_PASSING

Parameters
enabled:boolean

true indicates that the NULL should be passed; false indicates it should not.

Annotations
@Override
getBindback to summary
public ParameterBind<T> getBind()

Retrieve the binding associated with this parameter. The binding is only relevant for INPUT parameters. Can return null if nothing has been bound yet. To bind a value to the parameter use one of the bindValue methods.

Returns:ParameterBind<T>

The parameter binding

getModeback to summary
public ParameterMode getMode()

Redeclares org.hibernate.query.procedure.ProcedureParameter.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).

Returns:ParameterMode

The parameter mode.

Annotations
@Override
getNameback to summary
public String getName()

Redeclares javax.persistence.Parameter.getName.

The name under which this parameter was registered. Can be null which should indicate that positional registration was used (and therefore getPosition() should return non-null.

Returns:String

The name;

Annotations
@Override
getPositionback to summary
public Integer getPosition()

Redeclares javax.persistence.Parameter.getPosition.

The position at which this parameter was registered. Can be null which should indicate that named registration was used (and therefore getName() should return non-null).

Returns:Integer

The name;

Annotations
@Override
getTypeback to summary
public default Class<T> getType()

Deprecated

Call getParameterType() instead.

Return the Java type of the parameter.

Returns:Class<T>

The Java type of the parameter.

Annotations
@Deprecated
setHibernateTypeback to summary
public void setHibernateType(Type type)

Set the Hibernate mapping type for this parameter.

Parameters
type:Type

The Hibernate mapping type.