Interface SQLValueSetter<JAVA>

Type Parameters:
JAVA - the application value type
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SQLValueSetter<JAVA>
Performs the complete JDBC binding operation for one application value at one parameter position. The setter receives null values and is responsible for choosing the appropriate JDBC NULL operation. Setters configured on parameters are retained by compiled statements, so captured objects may remain reachable for the lifetime of those definitions. Callers choose suitable reuse, mutable-state, thread-safety, and connection or execution-specific lifetimes.
Since:
4.15
Author:
Eike Stepper
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setValue(PreparedStatement stmt, int index, JAVA value)
    Sets one application value at the supplied one-based JDBC parameter position.
  • Method Details

    • setValue

      void setValue(PreparedStatement stmt, int index, JAVA value) throws SQLException
      Sets one application value at the supplied one-based JDBC parameter position.
      Parameters:
      stmt - the prepared statement receiving the value
      index - the one-based parameter index
      value - the application value, possibly null
      Throws:
      SQLException - if the JDBC driver reports a binding failure