org.hibernate.type.descriptor.sql
Class BasicBinder<J>
java.lang.Object
org.hibernate.type.descriptor.sql.BasicBinder<J>
- All Implemented Interfaces:
- ValueBinder<J>
public abstract class BasicBinder<J>
- extends Object
- implements ValueBinder<J>
Convenience base implementation of ValueBinder
- Author:
- Steve Ebersole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
- Bind a value to a prepared statement.
- Specified by:
bind
in interface ValueBinder<J>
- Parameters:
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.
- Throws:
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.
- Parameters:
st
- The prepared statementvalue
- The value to bind (not null).index
- The index at which to bindoptions
- The binding options
- Throws:
SQLException
- Indicates a problem binding to the prepared statement.
Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.