Package org.hibernate.type.descriptor
Interface ValueBinder<X>
-
- All Known Implementing Classes:
BasicBinder,XmlJdbcType.XmlValueBinder
public interface ValueBinder<X>Contract for binding values to a JDBCPreparedStatement.- 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidbind(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 Detail
-
bind
void bind(PreparedStatement st, X value, int index, WrapperOptions options) throws SQLException
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
void bind(CallableStatement st, X value, String name, WrapperOptions options) throws SQLException
Bind a value to a callable statement by name- Throws:
SQLException- Indicates a JDBC error occurred.
-
getBindValue
default Object getBindValue(X value, WrapperOptions options) throws SQLException
- Throws:
SQLException
-
-