接口 ParameterRegistration<T>
-
- 所有超级接口:
javax.persistence.Parameter<T>,ProcedureParameter<T>,QueryParameter<T>
- 所有已知子接口:
ParameterRegistrationImplementor<T>,ProcedureParameterImplementor<T>
- 所有已知实现类:
ProcedureParameterImpl
public interface ParameterRegistration<T> extends ProcedureParameter<T>
Describes a registered procedure/function parameter.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 实例方法 抽象方法 默认方法 已过时的方法 修饰符和类型 方法 说明 voidbindValue(T value)Bind a value to the parameter.voidbindValue(T value, javax.persistence.TemporalType explicitTemporalType)Bind a value to the parameter, using just a specified portion of the DATE/TIME value.voidenablePassingNulls(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.javax.persistence.ParameterModegetMode()Retrieves the parameter "mode" which describes how the parameter is defined in the actual database procedure definition (is it an INPUT parameter?StringgetName()The name under which this parameter was registered.IntegergetPosition()The position at which this parameter was registered.default Class<T>getType()已过时。CallParameter.getParameterType()instead.voidsetHibernateType(Type type)Set the Hibernate mapping type for this parameter.-
从接口继承的方法 org.hibernate.query.procedure.ProcedureParameter
isPassNullsEnabled
-
从接口继承的方法 org.hibernate.query.QueryParameter
getHibernateType, getSourceLocations
-
-
-
-
方法详细资料
-
getName
String getName()
The name under which this parameter was registered. Can benullwhich should indicate that positional registration was used (and thereforegetPosition()should return non-null.- 指定者:
getName在接口中javax.persistence.Parameter<T>- 返回:
- The name;
-
getPosition
Integer getPosition()
The position at which this parameter was registered. Can benullwhich should indicate that named registration was used (and thereforegetName()should return non-null).- 指定者:
getPosition在接口中javax.persistence.Parameter<T>- 返回:
- The name;
-
getType
@Deprecated default Class<T> getType()
已过时。CallParameter.getParameterType()instead.Return the Java type of the parameter.- 返回:
- The Java type of the parameter.
-
getMode
javax.persistence.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).- 指定者:
getMode在接口中ProcedureParameter<T>- 返回:
- 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- 指定者:
enablePassingNulls在接口中ProcedureParameter<T>- 参数:
enabled-trueindicates that the NULL should be passed;falseindicates it should not.- 另请参阅:
enablePassingNulls(boolean)
-
setHibernateType
void setHibernateType(Type type)
Set the Hibernate mapping type for this parameter.- 参数:
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 returnnullif nothing has been bound yet. To bind a value to the parameter use one of thebindValue(T)methods.- 返回:
- 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.- 参数:
value- The value to bind.
-
bindValue
void bindValue(T value, javax.persistence.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.- 参数:
value- The value to bindexplicitTemporalType- An explicitly supplied TemporalType.
-
-