Interface BackendPreparedStatement


public interface BackendPreparedStatement
Just an interface to decouple dependency from PreparedStatementWrapper.
Author:
harald
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> int
    set(DataType<T> dataType, int p, T object, boolean mapNull, Integer size)
    Sets the object into the statement via its DataType.
    This method is provided for application-specific types.
    <T> void
    set(DataType<T> dataType, int p, T object, int index, boolean mapNull, Integer size)
    Sets a column of an object into a prepared statement via its DataType.
    This method is provided for application-specific types.
    void
    set(SqlType sqlType, int p, Object object)
    Generic setter for objects via known SqlType.
    void
    setArray(int p, Class<?> type, int columnIndex, Collection<?> elements, String operator)
    Sets an array parameter.
    Used for array operators such as IN, ANY or ALL.
    void
    Sets the designated parameter to the given java.math.BigDecimal value.
    void
    setBoolean(int p, boolean b)
    Sets the designated parameter to the given Java boolean value.
    void
    setBoolean(int p, Boolean b)
    Sets the designated parameter to the given Java Boolean value.
    void
    setByte(int p, byte b)
    Sets the designated parameter to the given Java byte value.
    void
    setByte(int p, Byte b)
    Sets the designated parameter to the given Java Byte value.
    void
    setChar(int p, char c)
    Sets the designated parameter to the given Java char value.
    void
    Sets the designated parameter to the given Java Character value.
    void
    setCharacter(int p, Character c, boolean mapNull)
    Sets the designated parameter to the given Java Character value.
    void
    setDate(int p, Date d)
    Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
    void
    setDate(int p, Date d, boolean mapNull)
    Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
    void
    setDate(int p, Date d, Calendar timezone)
    Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
    void
    setDate(int p, Date d, Calendar timezone, boolean mapNull)
    Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application.
    void
    setDouble(int p, double d)
    Sets the designated parameter to the given Java double value.
    void
    setDouble(int p, Double d)
    Sets the designated parameter to the given Java Double value.
    void
    setFloat(int p, float f)
    Sets the designated parameter to the given Java float value.
    void
    setFloat(int p, Float f)
    Sets the designated parameter to the given Java Float value.
    void
    setInstant(int p, Instant ts)
    Sets the designated parameter to the given java.time.Instant value.
    void
    setInstant(int p, Instant ts, boolean mapNull)
    Sets the designated parameter to the given java.time.Instant value.
    void
    setInt(int p, int i)
    Sets the designated parameter to the given Java int value.
    void
    setInteger(int p, Integer i)
    Sets the designated parameter to the given Java Integer value.
    void
    Sets a very large string.
    This is usually converted to SQL CLOB.
    void
    setLargeString(int p, String s, boolean mapNull)
    Sets a very large string.
    This is usually converted to SQL CLOB.
    void
    Sets the designated parameter to the given java.time.LocalDate value using the default time zone of the virtual machine that is running the application.
    void
    setLocalDate(int p, LocalDate d, boolean mapNull)
    Sets the designated parameter to the given java.time.LocalDate value using the default time zone of the virtual machine that is running the application.
    void
    Sets the designated parameter to the given java.time.LocalDateTime value.
    void
    setLocalDateTime(int p, LocalDateTime ts, boolean mapNull)
    Sets the designated parameter to the given java.time.LocalDateTime value.
    void
    Sets the designated parameter to the given java.time.LocalTime value.
    void
    setLong(int p, long l)
    Sets the designated parameter to the given Java long value.
    void
    setLong(int p, Long l)
    Sets the designated parameter to the given Java Long value.
    void
    setNull(int pos, int type)
    Sets the designated parameter to SQL NULL.
    void
    Sets the designated parameter to the given java.time.OffsetDateTime value.
    void
    setOffsetDateTime(int p, OffsetDateTime ts, boolean mapNull)
    Sets the designated parameter to the given java.time.OffsetDateTime value.
    void
    Sets the designated parameter to the given java.time.OffsetTime value.
    void
    setShort(int p, short s)
    Sets the designated parameter to the given Java short value.
    void
    setShort(int p, Short s)
    Sets the designated parameter to the given Java Short value.
    void
    setString(int p, String s)
    Sets the designated parameter to the given Java String value.
    void
    setString(int p, String s, boolean mapNull)
    Sets the designated parameter to the given Java String value.
    void
    setTime(int p, Time t)
    Sets the designated parameter to the given java.sql.Time value.
    void
    setTime(int p, Time t, Calendar timezone)
    Sets the designated parameter to the given java.sql.Time value.
    void
    setTimestamp(int p, Timestamp ts)
    Sets the designated parameter to the given java.sql.Timestamp value.
    void
    setTimestamp(int p, Timestamp ts, boolean mapNull)
    Sets the designated parameter to the given java.sql.Timestamp value.
    void
    setTimestamp(int p, Timestamp ts, Calendar timezone)
    Sets the designated parameter to the given java.sql.Timestamp value.
    void
    setTimestamp(int p, Timestamp ts, Calendar timezone, boolean mapNull)
    Sets the designated parameter to the given java.sql.Timestamp value.
    void
    Sets the designated parameter to the given java.time.ZonedDateTime value.
    void
    setZonedDateTime(int p, ZonedDateTime ts, boolean mapNull)
    Sets the designated parameter to the given java.time.ZonedDateTime value.
  • Method Details

    • set

      <T> int set(DataType<T> dataType, int p, T object, boolean mapNull, Integer size)
      Sets the object into the statement via its DataType.
      This method is provided for application-specific types.
      Type Parameters:
      T - the type
      Parameters:
      dataType - the datatype
      p - the positional index, starting at 1
      object - the object of given datatype
      mapNull - true if map null values
      size - the optional size from the model
      Returns:
      the number of columns set
    • set

      <T> void set(DataType<T> dataType, int p, T object, int index, boolean mapNull, Integer size)
      Sets a column of an object into a prepared statement via its DataType.
      This method is provided for application-specific types.
      Type Parameters:
      T - the type
      Parameters:
      dataType - the datatype
      p - the positional index, starting at 1
      object - the object of given datatype
      index - the column index
      mapNull - true if map null values
      size - the optional size from the model
    • set

      void set(SqlType sqlType, int p, Object object)
      Generic setter for objects via known SqlType.
      Parameters:
      sqlType - the sql type
      p - the positional index, starting at 1
      object - the object of given sql type
    • setArray

      void setArray(int p, Class<?> type, int columnIndex, Collection<?> elements, String operator)
      Sets an array parameter.
      Used for array operators such as IN, ANY or ALL.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      type - the type of the array's elements, or the inner type if elements implement Convertible
      columnIndex - the column index for multi-column DataTypes, -1 if type is a Convertible, ignored otherwise
      elements - the array elements
      operator - the array operator
    • setBoolean

      void setBoolean(int p, Boolean b)
      Sets the designated parameter to the given Java Boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      b - the parameter value, null if the value should be set to SQL NULL
    • setBoolean

      void setBoolean(int p, boolean b)
      Sets the designated parameter to the given Java boolean value. The driver converts this to an SQL BIT or BOOLEAN value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      b - the parameter value
    • setByte

      void setByte(int p, Byte b)
      Sets the designated parameter to the given Java Byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      b - the parameter value, null if the value should be set to SQL NULL
    • setByte

      void setByte(int p, byte b)
      Sets the designated parameter to the given Java byte value. The driver converts this to an SQL TINYINT value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      b - the parameter value
    • setChar

      void setChar(int p, char c)
      Sets the designated parameter to the given Java char value. The driver converts this to an SQL VARCHAR when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      c - the parameter value
    • setCharacter

      void setCharacter(int p, Character c)
      Sets the designated parameter to the given Java Character value. The driver converts this to an SQL VARCHAR when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      c - the parameter value, null if the value should be set to SQL NULL
    • setCharacter

      void setCharacter(int p, Character c, boolean mapNull)
      Sets the designated parameter to the given Java Character value. The driver converts this to an SQL VARCHAR when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      c - the parameter value, null if the value should be set to SQL NULL
      mapNull - true if null values should be mapped to BLANK, else SQL NULL
    • setDate

      void setDate(int p, Date d)
      Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. The driver converts this to an SQL DATE value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value, null if the value should be set to SQL NULL
    • setDate

      void setDate(int p, Date d, boolean mapNull)
      Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. The driver converts this to an SQL DATE value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value
      mapNull - to map null values to 1.1.1970 (epochal time zero), else SQL NULL
    • setDate

      void setDate(int p, Date d, Calendar timezone)
      Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. The driver converts this to an SQL DATE value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value
      timezone - the calendar providing the timezone configuration
    • setDate

      void setDate(int p, Date d, Calendar timezone, boolean mapNull)
      Sets the designated parameter to the given java.sql.Date value using the default time zone of the virtual machine that is running the application. The driver converts this to an SQL DATE value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value
      timezone - the calendar providing the timezone configuration
      mapNull - to map null values to 1.1.1970 (epochal time zero), else SQL NULL
    • setDouble

      void setDouble(int p, Double d)
      Sets the designated parameter to the given Java Double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value, null if the value should be set to SQL NULL
    • setDouble

      void setDouble(int p, double d)
      Sets the designated parameter to the given Java double value. The driver converts this to an SQL DOUBLE value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value
    • setFloat

      void setFloat(int p, Float f)
      Sets the designated parameter to the given Java Float value. The driver converts this to an SQL REAL value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      f - the parameter value, null if the value should be set to SQL NULL
    • setFloat

      void setFloat(int p, float f)
      Sets the designated parameter to the given Java float value. The driver converts this to an SQL REAL value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      f - the parameter value
    • setInt

      void setInt(int p, int i)
      Sets the designated parameter to the given Java int value. The driver converts this to an SQL INTEGER value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      i - the parameter value
    • setInteger

      void setInteger(int p, Integer i)
      Sets the designated parameter to the given Java Integer value. The driver converts this to an SQL INTEGER value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      i - the parameter value, null if the value should be set to SQL NULL
    • setLocalDate

      void setLocalDate(int p, LocalDate d)
      Sets the designated parameter to the given java.time.LocalDate value using the default time zone of the virtual machine that is running the application.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value, null if the value should be set to SQL NULL
    • setLocalDate

      void setLocalDate(int p, LocalDate d, boolean mapNull)
      Sets the designated parameter to the given java.time.LocalDate value using the default time zone of the virtual machine that is running the application.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value
      mapNull - to map null values to 1.1.1970 (epochal time zero), else SQL NULL
    • setLocalDateTime

      void setLocalDateTime(int p, LocalDateTime ts)
      Sets the designated parameter to the given java.time.LocalDateTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value, null if the value should be set to SQL NULL
    • setLocalDateTime

      void setLocalDateTime(int p, LocalDateTime ts, boolean mapNull)
      Sets the designated parameter to the given java.time.LocalDateTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      mapNull - to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
    • setOffsetDateTime

      void setOffsetDateTime(int p, OffsetDateTime ts)
      Sets the designated parameter to the given java.time.OffsetDateTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value, null if the value should be set to SQL NULL
    • setOffsetDateTime

      void setOffsetDateTime(int p, OffsetDateTime ts, boolean mapNull)
      Sets the designated parameter to the given java.time.OffsetDateTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      mapNull - to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
    • setZonedDateTime

      void setZonedDateTime(int p, ZonedDateTime ts)
      Sets the designated parameter to the given java.time.ZonedDateTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value, null if the value should be set to SQL NULL
    • setZonedDateTime

      void setZonedDateTime(int p, ZonedDateTime ts, boolean mapNull)
      Sets the designated parameter to the given java.time.ZonedDateTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      mapNull - to map null values to 1.1.1970 00:00:00.000 GMT (epochal time zero), else SQL NULL
    • setInstant

      void setInstant(int p, Instant ts)
      Sets the designated parameter to the given java.time.Instant value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value, null if the value should be set to SQL NULL
    • setInstant

      void setInstant(int p, Instant ts, boolean mapNull)
      Sets the designated parameter to the given java.time.Instant value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      mapNull - to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
    • setLocalTime

      void setLocalTime(int p, LocalTime t)
      Sets the designated parameter to the given java.time.LocalTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      t - the parameter value, null if the value should be set to SQL NULL
    • setOffsetTime

      void setOffsetTime(int p, OffsetTime t)
      Sets the designated parameter to the given java.time.OffsetTime value.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      t - the parameter value, null if the value should be set to SQL NULL
    • setLong

      void setLong(int p, Long l)
      Sets the designated parameter to the given Java Long value. The driver converts this to an SQL BIGINT value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      l - the parameter value, null if the value should be set to SQL NULL
    • setLong

      void setLong(int p, long l)
      Sets the designated parameter to the given Java long value. The driver converts this to an SQL BIGINT value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      l - the parameter value
    • setNull

      void setNull(int pos, int type)
      Sets the designated parameter to SQL NULL.
      Parameters:
      pos - the first parameter is 1, the second is 2, ...
      type - the SQL type code defined in java.sql.Types
    • setShort

      void setShort(int p, Short s)
      Sets the designated parameter to the given Java Short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      s - the parameter value, null if the value should be set to SQL NULL
    • setShort

      void setShort(int p, short s)
      Sets the designated parameter to the given Java short value. The driver converts this to an SQL SMALLINT value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      s - the parameter value
    • setString

      void setString(int p, String s)
      Sets the designated parameter to the given Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      s - the parameter value, null if the value should be set to SQL NULL
    • setString

      void setString(int p, String s, boolean mapNull)
      Sets the designated parameter to the given Java String value. The driver converts this to an SQL VARCHAR or LONGVARCHAR value (depending on the argument's size relative to the driver's limits on VARCHAR values) when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      s - the parameter value
      mapNull - true if null values should be mapped to the empty string, else SQL NULL
    • setLargeString

      void setLargeString(int p, String s, boolean mapNull)
      Sets a very large string.
      This is usually converted to SQL CLOB.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      s - the parameter value
      mapNull - true if null values should be mapped to the empty string, else SQL NULL
    • setLargeString

      void setLargeString(int p, String s)
      Sets a very large string.
      This is usually converted to SQL CLOB.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      s - the parameter value, null if the value should be set to SQL NULL
    • setTime

      void setTime(int p, Time t)
      Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      t - the parameter value, null if the value should be set to SQL NULL
    • setTime

      void setTime(int p, Time t, Calendar timezone)
      Sets the designated parameter to the given java.sql.Time value. The driver converts this to an SQL TIME value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      t - the parameter value, null if the value should be set to SQL NULL
      timezone - the calendar providing the timezone configuration
    • setTimestamp

      void setTimestamp(int p, Timestamp ts)
      Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value, null if the value should be set to SQL NULL
    • setTimestamp

      void setTimestamp(int p, Timestamp ts, boolean mapNull)
      Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      mapNull - to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
    • setTimestamp

      void setTimestamp(int p, Timestamp ts, Calendar timezone)
      Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      timezone - the calendar providing the timezone configuration else SQL NULL
    • setTimestamp

      void setTimestamp(int p, Timestamp ts, Calendar timezone, boolean mapNull)
      Sets the designated parameter to the given java.sql.Timestamp value. The driver converts this to an SQL TIMESTAMP value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      ts - the parameter value
      timezone - the calendar providing the timezone configuration
      mapNull - to map null values to 1.1.1970 00:00:00.000 (epochal time zero), else SQL NULL
    • setBigDecimal

      void setBigDecimal(int p, BigDecimal d)
      Sets the designated parameter to the given java.math.BigDecimal value. The driver converts this to an SQL NUMERIC value when it sends it to the database.
      Parameters:
      p - the first parameter is 1, the second is 2, ...
      d - the parameter value, null if the value should be set to SQL NULL