Package SQLite.JDBC2z

Class JDBCPreparedStatement

java.lang.Object
SQLite.JDBC2z.JDBCStatement
SQLite.JDBC2z.JDBCPreparedStatement
All Implemented Interfaces:
AutoCloseable, PreparedStatement, Statement, Wrapper

public class JDBCPreparedStatement
extends JDBCStatement
implements PreparedStatement
  • Constructor Details

  • Method Details

    • executeQuery

      public ResultSet executeQuery() throws SQLException
      Description copied from interface: PreparedStatement
      Executes the SQL query in the PreparedStatement and returns the ResultSet generated by the query.
      Specified by:
      executeQuery in interface PreparedStatement
      Returns:
      the ResultSet generated by the query, never null.
      Throws:
      SQLException - if a database error happens or if the SQL statement does not produce a ResultSet.
    • executeUpdate

      public int executeUpdate() throws SQLException
      Description copied from interface: PreparedStatement
      Invokes the SQL command contained within the prepared statement. This must be INSERT, UPDATE, DELETE, or a command that returns nothing.
      Specified by:
      executeUpdate in interface PreparedStatement
      Returns:
      the number of affected rows for INSERT, UPDATE or DELETE statements, 0 for statements that return nothing.
      Throws:
      SQLException - if a database error happens or if the SQL statement returns a ResultSet.
    • setNull

      public void setNull​(int parameterIndex, int sqlType) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to SQL NULL. Don't use this version of setNull for User Defined Types (UDT) or for REF type parameters.
      Specified by:
      setNull in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      sqlType - the SQL type of the parameter, as defined in java.sql.Types.
      Throws:
      SQLException - if a database error happens.
    • setBoolean

      public void setBoolean​(int parameterIndex, boolean x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied boolean value.
      Specified by:
      setBoolean in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the boolean value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setByte

      public void setByte​(int parameterIndex, byte x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied byte value.
      Specified by:
      setByte in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the byte value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setShort

      public void setShort​(int parameterIndex, short x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied short value.
      Specified by:
      setShort in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - a short value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setInt

      public void setInt​(int parameterIndex, int x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied int value.
      Specified by:
      setInt in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the int value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setLong

      public void setLong​(int parameterIndex, long x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied long value.
      Specified by:
      setLong in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the long value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setFloat

      public void setFloat​(int parameterIndex, float x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to to a supplied float value.
      Specified by:
      setFloat in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the float value to update the parameter.
      Throws:
      SQLException - if a database error happens.
    • setDouble

      public void setDouble​(int parameterIndex, double x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied double value.
      Specified by:
      setDouble in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the double value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setBigDecimal

      public void setBigDecimal​(int parameterIndex, BigDecimal x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.math.BigDecimal value.
      Specified by:
      setBigDecimal in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
      See Also:
      BigDecimal
    • setString

      public void setString​(int parameterIndex, String x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied string.
      Specified by:
      setString in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setBytes

      public void setBytes​(int parameterIndex, byte[] x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied array of bytes. The array is mapped to a VARBINARY or LONGVARBINARY in the database.
      Specified by:
      setBytes in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the array of bytes to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setDate

      public void setDate​(int parameterIndex, Date x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.Date value.
      Specified by:
      setDate in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Date to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setTime

      public void setTime​(int parameterIndex, Time x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.Time value.
      Specified by:
      setTime in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Time value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setTimestamp

      public void setTimestamp​(int parameterIndex, Timestamp x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.Timestamp value.
      Specified by:
      setTimestamp in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the java.sql.Timestamp value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setAsciiStream

      public void setAsciiStream​(int parameterIndex, InputStream x, int length) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the content of a supplied InputStream, which has a specified number of bytes.

      This is a good method for setting an SQL LONGVARCHAR parameter where the length of the data is large. Data is read from the InputStream until end-of-file is reached or the specified number of bytes is copied.

      Specified by:
      setAsciiStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the ASCII InputStream carrying the data to which the parameter at parameterIndex is set.
      length - the number of bytes in the InputStream to copy to the parameter.
      Throws:
      SQLException - if a database error happens.
    • setUnicodeStream

      @Deprecated public void setUnicodeStream​(int parameterIndex, InputStream x, int length) throws SQLException
      Deprecated.
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the characters from a supplied InputStream, with a specified number of bytes.
      Specified by:
      setUnicodeStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream with the character data to which the parameter at parameterIndex is set.
      length - the number of bytes to read from the InputStream.
      Throws:
      SQLException - if a database error happens.
    • setBinaryStream

      public void setBinaryStream​(int parameterIndex, InputStream x, int length) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the content of a supplied binary InputStream, which has a specified number of bytes.

      Use this method when a large amount of data needs to be set into a LONGVARBINARY parameter.

      Specified by:
      setBinaryStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the binary InputStream carrying the data to update the parameter.
      length - the number of bytes in the InputStream to copy to the parameter.
      Throws:
      SQLException - if a database error happens.
    • clearParameters

      public void clearParameters() throws SQLException
      Description copied from interface: PreparedStatement
      Clear the current parameter values.

      Typically, parameter values are retained for multiple executions of the Statement. Setting a parameter value replaces the previous value. This method clears the values for all parameters, releasing all resources used by those parameters.

      Specified by:
      clearParameters in interface PreparedStatement
      Throws:
      SQLException - if a database error happens.
    • setObject

      public void setObject​(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter using a supplied object.

      The object is converted to the given targetSqlType before it is sent to the database. If the object has a custom mapping (its class implements the interface SQLData), the JDBC driver will call the method SQLData.writeSQL to write it to the SQL data stream. If the object's class implements Ref, Blob, Clob, Struct, or Array, the driver will pass it to the database in the form of the relevant SQL type.

      Specified by:
      setObject in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter index, where the first parameter has index 1.
      x - the Object containing the value to which the parameter at parameterIndex is set.
      targetSqlType - the SQL type to send to the database, as defined in java.sql.Types.
      scale - the number of digits after the decimal point - only applies to the types java.sql.Types.DECIMAL and java.sql.Types.NUMERIC - ignored for all other types.
      Throws:
      SQLException - if a database error happens.
    • setObject

      public void setObject​(int parameterIndex, Object x, int targetSqlType) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter using a supplied object.

      The object is converted to the given targetSqlType before it is sent to the database. If the object has a custom mapping (its class implements the interface SQLData), the JDBC driver will call the method SQLData.writeSQL to write it to the SQL data stream. If the object's class implements Ref, Blob, Clob, Struct, or Array, the driver will pass it to the database in the form of the relevant SQL type.

      Specified by:
      setObject in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter index, where the first parameter has index 1.
      x - the Object containing the value to which the parameter at parameterIndex is set.
      targetSqlType - the SQL type to send to the database, as defined in java.sql.Types.
      Throws:
      SQLException - if a database error happens.
    • setObject

      public void setObject​(int parameterIndex, Object x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter using a supplied object.

      There is a standard mapping from Java types to SQL types, defined in the JDBC specification. The passed object is then transformed into the appropriate SQL type, and then transferred to the database. setObject can be used to pass abstract data types unique to the database, by using a JDBC driver specific Java type. If the object's class implements the interface SQLData, the JDBC driver calls SQLData.writeSQL to write it to the SQL data stream. If the object's class implements Ref, Blob, Clob, Struct, or Array, the driver passes it to the database as a value of the corresponding SQL type.

      Specified by:
      setObject in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the object containing the value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • execute

      public boolean execute() throws SQLException
      Description copied from interface: PreparedStatement
      Executes the SQL statement in this PreparedStatement.

      A PreparedStatement may return multiple results. The execute method executes the PreparedStatement and returns a flag indicating the kind of result produced by the action. The methods getResultSet or getUpdateCount are used to retrieve the first result, and the second and subsequent results are retrieved with getMoreResults.

      Specified by:
      execute in interface PreparedStatement
      Returns:
      true if the result of the execution is a ResultSet, false if there is no result or if the result is an update count.
      Throws:
      SQLException - if a database error happens.
    • addBatch

      public void addBatch() throws SQLException
      Description copied from interface: PreparedStatement
      Add a set of parameters to the PreparedStatement's command batch.
      Specified by:
      addBatch in interface PreparedStatement
      Throws:
      SQLException - if a database error happens.
    • executeBatch

      public int[] executeBatch() throws SQLException
      Description copied from interface: Statement
      Submits a batch of SQL commands to the database. Returns an array of update counts, if all the commands execute successfully.

      If one of the commands in the batch fails, this method can throw a BatchUpdateException and the JDBC driver may or may not process the remaining commands. The JDBC driver must behave consistently with the underlying database, following the "all or nothing" principle. If the driver continues processing, the array of results returned contains the same number of elements as there are commands in the batch, with a minimum of one of the elements having the EXECUTE_FAILED value.

      Specified by:
      executeBatch in interface Statement
      Overrides:
      executeBatch in class JDBCStatement
      Returns:
      an array of update counts, with one entry for each command in the batch. The elements are ordered according to the order in which the commands were added to the batch.

      1. If the value of an element is ≥ 0, the corresponding command completed successfully and the value is the update count (the number of rows in the database affected by the command) for that command.
      2. If the value is SUCCESS_NO_INFO, the command completed successfully but the number of rows affected is unknown.
      3. If the value is EXECUTE_FAILED, the command failed.
      Throws:
      SQLException - if an error occurs accessing the database.
    • clearBatch

      public void clearBatch() throws SQLException
      Description copied from interface: Statement
      Clears the current list of SQL commands for this statement.
      Specified by:
      clearBatch in interface Statement
      Overrides:
      clearBatch in class JDBCStatement
      Throws:
      SQLException - if an error occurs accessing the database or the database does not support batch updates.
    • close

      public void close() throws SQLException
      Description copied from interface: Statement
      Releases this statement's database and JDBC driver resources.

      Using this method to release these resources as soon as possible is strongly recommended.

      One should not rely on the resources being automatically released when finalized during garbage collection. Doing so can result in unpredictable behavior for the application.

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Statement
      Overrides:
      close in class JDBCStatement
      Throws:
      SQLException - if an error occurs accessing the database.
    • setCharacterStream

      public void setCharacterStream​(int parameterIndex, Reader reader, int length) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the character content of a Reader object, with the specified length of character data.

      Data is read from the Reader until end-of-file is reached or the specified number of characters are copied.

      Specified by:
      setCharacterStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1
      reader - the java.io.Reader containing the character data.
      length - the number of characters to be read.
      Throws:
      SQLException - if a database error happens.
    • setRef

      public void setRef​(int i, Ref x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied REF(<structured-type>) value. This is stored as an SQL REF.
      Specified by:
      setRef in interface PreparedStatement
      Parameters:
      i - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Ref value to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
      See Also:
      Ref
    • setBlob

      public void setBlob​(int i, Blob x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the given Blob object.
      Specified by:
      setBlob in interface PreparedStatement
      Parameters:
      i - the parameter number index, where the first parameter has index 1.
      x - the java.sql.Blob to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
      See Also:
      Blob
    • setClob

      public void setClob​(int i, Clob x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the given Clob object.
      Specified by:
      setClob in interface PreparedStatement
      Parameters:
      i - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Clob holding the data to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setArray

      public void setArray​(int i, Array x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to the supplied Array.
      Specified by:
      setArray in interface PreparedStatement
      Parameters:
      i - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Array giving the new value of the parameter at parameterIndex.
      Throws:
      SQLException - if a database error happens.
      See Also:
      Array
    • getMetaData

      public ResultSetMetaData getMetaData() throws SQLException
      Description copied from interface: PreparedStatement
      Returns a ResultSetMetaData describing the ResultSet that would be produced by execution of the PreparedStatement.

      It is possible to know the metadata for the ResultSet without executing the PreparedStatement, because the PreparedStatement is precompiled. As a result the metadata can be queried ahead of time without actually executing the statement.

      Specified by:
      getMetaData in interface PreparedStatement
      Returns:
      a ResultSetMetaData object with the information about the columns of the ResultSet, if the driver can return a ResultSetMetaData. null otherwise.
      Throws:
      SQLException - if there is a database error.
    • setDate

      public void setDate​(int parameterIndex, Date x, Calendar cal) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.Date value, using a supplied Calendar to map the Date. The Calendar allows the application to control the timezone used to compute the SQL DATE in the database - without the supplied Calendar, the driver uses the VM defaults. See "Be wary of the default locale".
      Specified by:
      setDate in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Date to which the parameter at parameterIndex is set.
      cal - a Calendar to use to construct the SQL DATE value.
      Throws:
      SQLException - if a database error happens.
      See Also:
      Date, Calendar
    • setTime

      public void setTime​(int parameterIndex, Time x, Calendar cal) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.Time value, using a supplied Calendar.

      The driver uses the supplied Calendar to create the SQL TIME value, which allows it to use a custom timezone - otherwise the driver uses the VM defaults. See "Be wary of the default locale".

      Specified by:
      setTime in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - a java.sql.Time value to which the parameter at parameterIndex is set.
      cal - a Calendar to use to construct the SQL TIME value.
      Throws:
      SQLException - if a database error happens.
      See Also:
      Time, Calendar
    • setTimestamp

      public void setTimestamp​(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.Timestamp value, using the supplied Calendar.

      The driver uses the supplied Calendar to create the SQL TIMESTAMP value, which allows it to use a custom timezone - otherwise the driver uses the VM defaults. See "Be wary of the default locale".

      Specified by:
      setTimestamp in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the java.sql.Timestamp value to which the parameter at parameterIndex is set.
      cal - a Calendar to use to construct the SQL TIMESTAMP value
      Throws:
      SQLException - if a database error happens.
      See Also:
      Timestamp, Calendar
    • setNull

      public void setNull​(int parameterIndex, int sqlType, String typeName) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to SQL NULL. This version of setNull should be used for User Defined Types (UDTs) and also REF types. UDTs can be STRUCT, DISTINCT, JAVA_OBJECT and named array types.

      Applications must provide the SQL type code and also a fully qualified SQL type name when supplying a NULL UDT or REF. For a UDT, the type name is the type name of the parameter itself, but for a REF parameter the type name is the type name of the referenced type.

      Specified by:
      setNull in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      sqlType - the SQL type of the parameter, as defined in java.sql.Types.
      typeName - the fully qualified name of a UDT or REF type - ignored if the parameter is not a UDT.
      Throws:
      SQLException - if a database error happens.
      See Also:
      Types
    • getParameterMetaData

      public ParameterMetaData getParameterMetaData() throws SQLException
      Description copied from interface: PreparedStatement
      Gets information about the parameters of the PreparedStatement.
      Specified by:
      getParameterMetaData in interface PreparedStatement
      Returns:
      a ParameterMetaData object which holds information about the number, type, and properties of the parameters of this PreparedStatement.
      Throws:
      SQLException - if a database error happens.
    • registerOutputParameter

      public void registerOutputParameter​(String parameterName, int sqlType) throws SQLException
      Throws:
      SQLException
    • registerOutputParameter

      public void registerOutputParameter​(String parameterName, int sqlType, int scale) throws SQLException
      Throws:
      SQLException
    • registerOutputParameter

      public void registerOutputParameter​(String parameterName, int sqlType, String typeName) throws SQLException
      Throws:
      SQLException
    • getURL

      public URL getURL​(int parameterIndex) throws SQLException
      Throws:
      SQLException
    • setURL

      public void setURL​(int parameterIndex, URL url) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.net.URL.
      Specified by:
      setURL in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      url - the URL to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
      See Also:
      URL
    • setNull

      public void setNull​(String parameterName, int sqlType) throws SQLException
      Throws:
      SQLException
    • setBoolean

      public void setBoolean​(String parameterName, boolean val) throws SQLException
      Throws:
      SQLException
    • setByte

      public void setByte​(String parameterName, byte val) throws SQLException
      Throws:
      SQLException
    • setShort

      public void setShort​(String parameterName, short val) throws SQLException
      Throws:
      SQLException
    • setInt

      public void setInt​(String parameterName, int val) throws SQLException
      Throws:
      SQLException
    • setLong

      public void setLong​(String parameterName, long val) throws SQLException
      Throws:
      SQLException
    • setFloat

      public void setFloat​(String parameterName, float val) throws SQLException
      Throws:
      SQLException
    • setDouble

      public void setDouble​(String parameterName, double val) throws SQLException
      Throws:
      SQLException
    • setBigDecimal

      public void setBigDecimal​(String parameterName, BigDecimal val) throws SQLException
      Throws:
      SQLException
    • setString

      public void setString​(String parameterName, String val) throws SQLException
      Throws:
      SQLException
    • setBytes

      public void setBytes​(String parameterName, byte[] val) throws SQLException
      Throws:
      SQLException
    • setDate

      public void setDate​(String parameterName, Date val) throws SQLException
      Throws:
      SQLException
    • setTime

      public void setTime​(String parameterName, Time val) throws SQLException
      Throws:
      SQLException
    • setTimestamp

      public void setTimestamp​(String parameterName, Timestamp val) throws SQLException
      Throws:
      SQLException
    • setAsciiStream

      public void setAsciiStream​(String parameterName, InputStream s, int length) throws SQLException
      Throws:
      SQLException
    • setBinaryStream

      public void setBinaryStream​(String parameterName, InputStream s, int length) throws SQLException
      Throws:
      SQLException
    • setObject

      public void setObject​(String parameterName, Object val, int targetSqlType, int scale) throws SQLException
      Throws:
      SQLException
    • setObject

      public void setObject​(String parameterName, Object val, int targetSqlType) throws SQLException
      Throws:
      SQLException
    • setObject

      public void setObject​(String parameterName, Object val) throws SQLException
      Throws:
      SQLException
    • setCharacterStream

      public void setCharacterStream​(String parameterName, Reader r, int length) throws SQLException
      Throws:
      SQLException
    • setDate

      public void setDate​(String parameterName, Date val, Calendar cal) throws SQLException
      Throws:
      SQLException
    • setTime

      public void setTime​(String parameterName, Time val, Calendar cal) throws SQLException
      Throws:
      SQLException
    • setTimestamp

      public void setTimestamp​(String parameterName, Timestamp val, Calendar cal) throws SQLException
      Throws:
      SQLException
    • setNull

      public void setNull​(String parameterName, int sqlType, String typeName) throws SQLException
      Throws:
      SQLException
    • getString

      public String getString​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getBoolean

      public boolean getBoolean​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getByte

      public byte getByte​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getShort

      public short getShort​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getInt

      public int getInt​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getLong

      public long getLong​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getFloat

      public float getFloat​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getDouble

      public double getDouble​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getBytes

      public byte[] getBytes​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getDate

      public Date getDate​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getTime

      public Time getTime​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getTimestamp

      public Timestamp getTimestamp​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getObject

      public Object getObject​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getObject

      public Object getObject​(int parameterIndex) throws SQLException
      Throws:
      SQLException
    • getBigDecimal

      public BigDecimal getBigDecimal​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getObject

      public Object getObject​(String parameterName, Map map) throws SQLException
      Throws:
      SQLException
    • getObject

      public Object getObject​(int parameterIndex, Map map) throws SQLException
      Throws:
      SQLException
    • getRef

      public Ref getRef​(int parameterIndex) throws SQLException
      Throws:
      SQLException
    • getRef

      public Ref getRef​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getBlob

      public Blob getBlob​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getBlob

      public Blob getBlob​(int parameterIndex) throws SQLException
      Throws:
      SQLException
    • getClob

      public Clob getClob​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getClob

      public Clob getClob​(int parameterIndex) throws SQLException
      Throws:
      SQLException
    • getArray

      public Array getArray​(String parameterName) throws SQLException
      Throws:
      SQLException
    • getArray

      public Array getArray​(int parameterIndex) throws SQLException
      Throws:
      SQLException
    • getDate

      public Date getDate​(String parameterName, Calendar cal) throws SQLException
      Throws:
      SQLException
    • getDate

      public Date getDate​(int parameterIndex, Calendar cal) throws SQLException
      Throws:
      SQLException
    • getTime

      public Time getTime​(String parameterName, Calendar cal) throws SQLException
      Throws:
      SQLException
    • getTime

      public Time getTime​(int parameterIndex, Calendar cal) throws SQLException
      Throws:
      SQLException
    • getTimestamp

      public Timestamp getTimestamp​(String parameterName, Calendar cal) throws SQLException
      Throws:
      SQLException
    • getTimestamp

      public Timestamp getTimestamp​(int parameterIndex, Calendar cal) throws SQLException
      Throws:
      SQLException
    • getURL

      public URL getURL​(String parameterName) throws SQLException
      Throws:
      SQLException
    • setRowId

      public void setRowId​(int parameterIndex, RowId x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied java.sql.RowId.
      Specified by:
      setRowId in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the RowId to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setRowId

      public void setRowId​(String parameterName, RowId x) throws SQLException
      Throws:
      SQLException
    • setNString

      public void setNString​(int parameterIndex, String value) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of a specified parameter to a supplied string.
      Specified by:
      setNString in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      value - the String to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setNString

      public void setNString​(String parameterName, String value) throws SQLException
      Throws:
      SQLException
    • setNCharacterStream

      public void setNCharacterStream​(int parameterIndex, Reader x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length characters from reader.
      Specified by:
      setNCharacterStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setNCharacterStream

      public void setNCharacterStream​(String parameterName, Reader x, long len) throws SQLException
      Throws:
      SQLException
    • setNClob

      public void setNClob​(int parameterIndex, NClob value) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to value.
      Specified by:
      setNClob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      value - the NClob to which the parameter at parameterIndex is set.
      Throws:
      SQLException - if a database error happens.
    • setNClob

      public void setNClob​(String parameterName, NClob value) throws SQLException
      Throws:
      SQLException
    • setClob

      public void setClob​(int parameterIndex, Reader x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length characters from reader.
      Specified by:
      setClob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setClob

      public void setClob​(String parameterName, Reader x, long len) throws SQLException
      Throws:
      SQLException
    • setBlob

      public void setBlob​(int parameterIndex, InputStream x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length bytes from inputStream.
      Specified by:
      setBlob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setBlob

      public void setBlob​(String parameterName, InputStream x, long len) throws SQLException
      Throws:
      SQLException
    • setNClob

      public void setNClob​(int parameterIndex, Reader x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length characters from reader.
      Specified by:
      setNClob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setNClob

      public void setNClob​(String parameterName, Reader x, long len) throws SQLException
      Throws:
      SQLException
    • setSQLXML

      public void setSQLXML​(int parameterIndex, SQLXML xml) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the value of xmlObject.
      Specified by:
      setSQLXML in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      xml - the SQLXML
      Throws:
      SQLException - if a database error happens.
    • setSQLXML

      public void setSQLXML​(String parameterName, SQLXML xml) throws SQLException
      Throws:
      SQLException
    • setAsciiStream

      public void setAsciiStream​(int parameterIndex, InputStream x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length bytes from inputStream.
      Specified by:
      setAsciiStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setAsciiStream

      public void setAsciiStream​(String parameterName, InputStream x, long len) throws SQLException
      Throws:
      SQLException
    • setBinaryStream

      public void setBinaryStream​(int parameterIndex, InputStream x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length bytes from inputStream.
      Specified by:
      setBinaryStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setBinaryStream

      public void setBinaryStream​(String parameterName, InputStream x, long len) throws SQLException
      Throws:
      SQLException
    • setCharacterStream

      public void setCharacterStream​(int parameterIndex, Reader x, long len) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the next length characters from reader.
      Specified by:
      setCharacterStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      len - character count
      Throws:
      SQLException - if a database error happens.
    • setCharacterStream

      public void setCharacterStream​(String parameterName, Reader x, long len) throws SQLException
      Throws:
      SQLException
    • setAsciiStream

      public void setAsciiStream​(int parameterIndex, InputStream x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the bytes from inputStream.
      Specified by:
      setAsciiStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream
      Throws:
      SQLException - if a database error happens.
    • setAsciiStream

      public void setAsciiStream​(String parameterName, InputStream x) throws SQLException
      Throws:
      SQLException
    • setBinaryStream

      public void setBinaryStream​(int parameterIndex, InputStream x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the bytes from inputStream.
      Specified by:
      setBinaryStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream
      Throws:
      SQLException - if a database error happens.
    • setBinaryStream

      public void setBinaryStream​(String parameterName, InputStream x) throws SQLException
      Throws:
      SQLException
    • setCharacterStream

      public void setCharacterStream​(int parameterIndex, Reader x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the characters from reader.
      Specified by:
      setCharacterStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      Throws:
      SQLException - if a database error happens.
    • setCharacterStream

      public void setCharacterStream​(String parameterName, Reader x) throws SQLException
      Throws:
      SQLException
    • setNCharacterStream

      public void setNCharacterStream​(int parameterIndex, Reader x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the characters from reader.
      Specified by:
      setNCharacterStream in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      Throws:
      SQLException - if a database error happens.
    • setNCharacterStream

      public void setNCharacterStream​(String parameterName, Reader x) throws SQLException
      Throws:
      SQLException
    • setClob

      public void setClob​(int parameterIndex, Reader x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the characters from reader.
      Specified by:
      setClob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      Throws:
      SQLException - if a database error happens.
    • setClob

      public void setClob​(String parameterName, Reader x) throws SQLException
      Throws:
      SQLException
    • setBlob

      public void setBlob​(int parameterIndex, InputStream x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the bytes from inputStream.
      Specified by:
      setBlob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the InputStream
      Throws:
      SQLException - if a database error happens.
    • setBlob

      public void setBlob​(String parameterName, InputStream x) throws SQLException
      Throws:
      SQLException
    • setNClob

      public void setNClob​(int parameterIndex, Reader x) throws SQLException
      Description copied from interface: PreparedStatement
      Sets the value of the specified parameter to the characters from reader.
      Specified by:
      setNClob in interface PreparedStatement
      Parameters:
      parameterIndex - the parameter number index, where the first parameter has index 1.
      x - the Reader
      Throws:
      SQLException - if a database error happens.
    • setNClob

      public void setNClob​(String parameterName, Reader x) throws SQLException
      Throws:
      SQLException