类 ProcedureParameterImpl<T>
- java.lang.Object
-
- org.hibernate.query.internal.QueryParameterImpl<T>
-
- org.hibernate.query.procedure.internal.ProcedureParameterImpl<T>
-
- 所有已实现的接口:
javax.persistence.Parameter<T>,ParameterRegistration<T>,ParameterRegistrationImplementor<T>,ProcedureParameter<T>,ProcedureParameterImplementor<T>,QueryParameter<T>
public class ProcedureParameterImpl<T> extends QueryParameterImpl<T> implements ProcedureParameterImplementor<T>, ParameterRegistration<T>
- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 ProcedureParameterImpl(ProcedureCallImpl procedureCall, Integer position, javax.persistence.ParameterMode mode, Class<T> javaType, Type hibernateType, boolean initialPassNullsSetting)ProcedureParameterImpl(ProcedureCallImpl procedureCall, String name, javax.persistence.ParameterMode mode, Class<T> javaType, Type hibernateType, boolean initialPassNullsSetting)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidbindValue(Object value)Bind a value to the parameter.voidbindValue(Object 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.Textract(CallableStatement statement)Extract value from the statement after execution (used for OUT/INOUT parameters).ParameterBind<T>getBind()Retrieve the binding associated with this parameter.javax.persistence.ParameterModegetMode()Retrieves the parameter "mode".StringgetName()The name under which this parameter was registered.Class<T>getParameterType()IntegergetPosition()The position at which this parameter was registered.int[]getSourceLocations()int[]getSqlTypes()Access to the SQL type(s) for this parameterbooleanisPassNullsEnabled()How will an unbound value be handled in terms of the JDBC parameter?voidprepare(CallableStatement statement, int startIndex)Prepare for execution.voidsetHibernateType(Type expectedType)Set the Hibernate mapping type for this parameter.-
从类继承的方法 org.hibernate.query.internal.QueryParameterImpl
getHibernateType
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.procedure.ParameterRegistration
getType
-
从接口继承的方法 org.hibernate.procedure.spi.ParameterRegistrationImplementor
getHibernateType
-
-
-
-
构造器详细资料
-
ProcedureParameterImpl
public ProcedureParameterImpl(ProcedureCallImpl procedureCall, String name, javax.persistence.ParameterMode mode, Class<T> javaType, Type hibernateType, boolean initialPassNullsSetting)
-
ProcedureParameterImpl
public ProcedureParameterImpl(ProcedureCallImpl procedureCall, Integer position, javax.persistence.ParameterMode mode, Class<T> javaType, Type hibernateType, boolean initialPassNullsSetting)
-
-
方法详细资料
-
getMode
public javax.persistence.ParameterMode getMode()
从接口复制的说明:ProcedureParameterRetrieves the parameter "mode". Only really pertinent in regards to procedure/function calls. In all other cases the mode would beParameterMode.IN- 指定者:
getMode在接口中ParameterRegistration<T>- 指定者:
getMode在接口中ProcedureParameter<T>- 返回:
- The parameter mode.
-
isPassNullsEnabled
public boolean isPassNullsEnabled()
从接口复制的说明:ProcedureParameterHow will an unbound value be handled in terms of the JDBC parameter?- 指定者:
isPassNullsEnabled在接口中ParameterRegistrationImplementor<T>- 指定者:
isPassNullsEnabled在接口中ProcedureParameter<T>- 返回:
truehere indicates that NULL should be passed;falseindicates that it is ignored.- 另请参阅:
ParameterRegistrationImplementor.isPassNullsEnabled()
-
enablePassingNulls
public void enablePassingNulls(boolean enabled)
从接口复制的说明:ProcedureParameterControls how unbound values for this IN/INOUT parameter registration will be handled prior to execution. For details seeParameterRegistration.enablePassingNulls(boolean)- 指定者:
enablePassingNulls在接口中ParameterRegistration<T>- 指定者:
enablePassingNulls在接口中ProcedureParameter<T>- 参数:
enabled-trueindicates that the NULL should be passed;falseindicates it should not.- 另请参阅:
ParameterRegistration.enablePassingNulls(boolean)
-
getSourceLocations
public int[] getSourceLocations()
- 指定者:
getSourceLocations在接口中QueryParameter<T>
-
getName
public String getName()
从接口复制的说明:ParameterRegistrationThe name under which this parameter was registered. Can benullwhich should indicate that positional registration was used (and thereforeParameterRegistration.getPosition()should return non-null.- 指定者:
getName在接口中javax.persistence.Parameter<T>- 指定者:
getName在接口中ParameterRegistration<T>- 返回:
- The name;
-
getPosition
public Integer getPosition()
从接口复制的说明:ParameterRegistrationThe position at which this parameter was registered. Can benullwhich should indicate that named registration was used (and thereforeParameterRegistration.getName()should return non-null).- 指定者:
getPosition在接口中javax.persistence.Parameter<T>- 指定者:
getPosition在接口中ParameterRegistration<T>- 返回:
- The name;
-
setHibernateType
public void setHibernateType(Type expectedType)
从接口复制的说明:ParameterRegistrationSet the Hibernate mapping type for this parameter.- 指定者:
setHibernateType在接口中ParameterRegistration<T>- 覆盖:
setHibernateType在类中QueryParameterImpl<T>- 参数:
expectedType- The Hibernate mapping type.
-
getParameterType
public Class<T> getParameterType()
- 指定者:
getParameterType在接口中javax.persistence.Parameter<T>- 覆盖:
getParameterType在类中QueryParameterImpl<T>
-
getBind
public ParameterBind<T> getBind()
从接口复制的说明:ParameterRegistrationRetrieve 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 theParameterRegistration.bindValue(T)methods.- 指定者:
getBind在接口中ParameterRegistration<T>- 返回:
- The parameter binding
-
bindValue
public void bindValue(Object value)
从接口复制的说明:ParameterRegistrationBind a value to the parameter. How this value is bound to the underlying JDBC CallableStatement is totally dependent on the Hibernate type.- 指定者:
bindValue在接口中ParameterRegistration<T>- 参数:
value- The value to bind.
-
bindValue
public void bindValue(Object value, javax.persistence.TemporalType explicitTemporalType)
从接口复制的说明:ParameterRegistrationBind 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.- 指定者:
bindValue在接口中ParameterRegistration<T>- 参数:
value- The value to bindexplicitTemporalType- An explicitly supplied TemporalType.
-
prepare
public void prepare(CallableStatement statement, int startIndex) throws SQLException
从接口复制的说明:ParameterRegistrationImplementorPrepare for execution.- 指定者:
prepare在接口中ParameterRegistrationImplementor<T>- 参数:
statement- The statement about to be executedstartIndex- The parameter index for this registration (used for positional)- 抛出:
SQLException- Indicates a problem accessing the statement object
-
getSqlTypes
public int[] getSqlTypes()
从接口复制的说明:ParameterRegistrationImplementorAccess to the SQL type(s) for this parameter- 指定者:
getSqlTypes在接口中ParameterRegistrationImplementor<T>- 返回:
- The SQL types (JDBC type codes)
-
extract
public T extract(CallableStatement statement)
从接口复制的说明:ParameterRegistrationImplementorExtract value from the statement after execution (used for OUT/INOUT parameters).- 指定者:
extract在接口中ParameterRegistrationImplementor<T>- 参数:
statement- The callable statement- 返回:
- The extracted value
-
-