Package org.hibernate.type.descriptor
Interface ValueBinder<X>
- All Known Implementing Classes:
BasicBinder,SetObjectBinder,XmlArrayJdbcType.XmlArrayBinder,XmlJdbcType.XmlValueBinder
public interface ValueBinder<X>
Contract for binding values to a JDBC
PreparedStatement.- API Note:
- Binders, as well as extractors, should never apply conversions. Instead, callers of the binder are expected to coordinate between the binding and conversion.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbind(CallableStatement st, X value, String name, WrapperOptions options) Bind a value to a callable statement by namevoidbind(PreparedStatement st, X value, int index, WrapperOptions options) Bind a value to a prepared statement by indexdefault ObjectgetBindValue(X value, WrapperOptions options)
-
Method Details
-
bind
Bind a value to a prepared statement by index- Throws:
SQLException- Indicates a JDBC error occurred.- API Note:
- Also works for callables since
CallableStatementextendsPreparedStatement
-
bind
Bind a value to a callable statement by name- Throws:
SQLException- Indicates a JDBC error occurred.
-
getBindValue
- Throws:
SQLException
-