public abstract class BasicBinder<J> extends Object implements ValueBinder<J>
ValueBinder
Constructor and Description |
---|
BasicBinder(JavaTypeDescriptor<J> javaDescriptor,
SqlTypeDescriptor sqlDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
bind(CallableStatement st,
J value,
String name,
WrapperOptions options)
Bind a value to a CallableStatement.
|
void |
bind(PreparedStatement st,
J value,
int index,
WrapperOptions options)
Bind a value to a prepared statement.
|
protected abstract void |
doBind(CallableStatement st,
J value,
String name,
WrapperOptions options)
Perform the binding.
|
protected abstract void |
doBind(PreparedStatement st,
J value,
int index,
WrapperOptions options)
Perform the binding.
|
JavaTypeDescriptor<J> |
getJavaDescriptor() |
SqlTypeDescriptor |
getSqlDescriptor() |
public BasicBinder(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
public JavaTypeDescriptor<J> getJavaDescriptor()
public SqlTypeDescriptor getSqlDescriptor()
public final void bind(PreparedStatement st, J value, int index, WrapperOptions options) throws SQLException
ValueBinder
bind
in interface 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.public final void bind(CallableStatement st, J value, String name, WrapperOptions options) throws SQLException
ValueBinder
bind
in interface 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.protected abstract void doBind(PreparedStatement st, J value, int index, WrapperOptions options) throws SQLException
st
- The prepared statementvalue
- The value to bind (not null).index
- The index at which to bindoptions
- The binding optionsSQLException
- Indicates a problem binding to the prepared statement.protected abstract void doBind(CallableStatement st, J value, String name, WrapperOptions options) throws SQLException
st
- The CallableStatementvalue
- The value to bind (not null).name
- The name at which to bindoptions
- The binding optionsSQLException
- Indicates a problem binding to the prepared statement.Copyright © 2017 JBoss by Red Hat. All rights reserved.