类 BasicBinder<J>
- java.lang.Object
-
- org.hibernate.type.descriptor.sql.BasicBinder<J>
-
- 所有已实现的接口:
ValueBinder<J>
public abstract class BasicBinder<J> extends Object implements ValueBinder<J>
Convenience base implementation ofValueBinder- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 BasicBinder(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 voidbind(CallableStatement st, J value, String name, WrapperOptions options)Bind a value to a CallableStatement.voidbind(PreparedStatement st, J value, int index, WrapperOptions options)Bind a value to a prepared statement.protected abstract voiddoBind(CallableStatement st, J value, String name, WrapperOptions options)Perform the binding.protected abstract voiddoBind(PreparedStatement st, J value, int index, WrapperOptions options)Perform the binding.JavaTypeDescriptor<J>getJavaDescriptor()SqlTypeDescriptorgetSqlDescriptor()
-
-
-
构造器详细资料
-
BasicBinder
public BasicBinder(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
-
-
方法详细资料
-
getJavaDescriptor
public JavaTypeDescriptor<J> getJavaDescriptor()
-
getSqlDescriptor
public SqlTypeDescriptor getSqlDescriptor()
-
bind
public final void bind(PreparedStatement st, J value, int index, WrapperOptions options) throws SQLException
从接口复制的说明:ValueBinderBind a value to a prepared statement.- 指定者:
bind在接口中ValueBinder<J>- 参数:
st- The prepared statement to which to bind the value.value- The value to bind.index- The position at which to bind the value within the prepared statementoptions- The options.- 抛出:
SQLException- Indicates a JDBC error occurred.
-
bind
public final void bind(CallableStatement st, J value, String name, WrapperOptions options) throws SQLException
从接口复制的说明:ValueBinderBind a value to a CallableStatement.- 指定者:
bind在接口中ValueBinder<J>- 参数:
st- The prepared statement to which to bind the value.value- The value to bind.name- The name to bind the value within the prepared statementoptions- The options.- 抛出:
SQLException- Indicates a JDBC error occurred.
-
doBind
protected abstract void doBind(PreparedStatement st, J value, int index, WrapperOptions options) throws SQLException
Perform the binding. Safe to assume that value is not null.- 参数:
st- The prepared statementvalue- The value to bind (not null).index- The index at which to bindoptions- The binding options- 抛出:
SQLException- Indicates a problem binding to the prepared statement.
-
doBind
protected abstract void doBind(CallableStatement st, J value, String name, WrapperOptions options) throws SQLException
Perform the binding. Safe to assume that value is not null.- 参数:
st- The CallableStatementvalue- The value to bind (not null).name- The name at which to bindoptions- The binding options- 抛出:
SQLException- Indicates a problem binding to the prepared statement.
-
-