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(PreparedStatement st,
J value,
int index,
WrapperOptions options)
Bind a value to a prepared statement.
|
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
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.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.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.