Package org.hibernate.type.descriptor
Interface ValueBinder<X>
- All Known Implementing Classes:
BasicBinder
,SetObjectBinder
,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 TypeMethodDescriptionvoid
bind
(CallableStatement st, X value, String name, WrapperOptions options) Bind a value to a callable statement by namevoid
bind
(PreparedStatement st, X value, int index, WrapperOptions options) Bind a value to a prepared statement by indexdefault Object
getBindValue
(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
CallableStatement
extendsPreparedStatement
-
bind
Bind a value to a callable statement by name- Throws:
SQLException
- Indicates a JDBC error occurred.
-
getBindValue
- Throws:
SQLException
-