com.pivotal.gemfirexd.internal.client.am

## Class PreparedStatement

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.am.Statement
  - - com.pivotal.gemfirexd.internal.client.am.PreparedStatement

All Implemented Interfaces:
  PreparedStatementCallbackInterface, StatementCallbackInterface, UnitOfWorkListener, AutoCloseable, PreparedStatement, Statement, Wrapper

Direct Known Subclasses:
  CallableStatement, SingleHopPreparedStatement

    public abstract class PreparedStatement
    extends Statement
    implements PreparedStatement, PreparedStatementCallbackInterface

### Field Summary

Fields
`protected int[]` `clientParamTypeAtFirstExecute`
`boolean` `internalPreparedStatement`
`MaterialPreparedStatement` `materialPreparedStatement_`
`boolean` `outputRegistered_`
`ColumnMetaData` `parameterMetaData_`
`Object[]` `parameters_`
`protected ClientPooledConnection` `pooledConnection_`
`protected boolean` `singleHopInfoAlreadyFetched_`
`String` `sql_`
`protected boolean` `superFlowExecuteCalled_`

### Fields inherited from class com.pivotal.gemfirexd.internal.client.am.Statement

`autoGeneratedKeys_, cachedCursor_, cachedSingletonRowData_, CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, cursorAttributesToSendOnPrepare_, doWriteTimeout, fetchDirection_, fetchSize_, generatedKeysColumnIndexes_, generatedKeysColumnNames_, generatedKeysResultSet_, indexOfCurrentResultSet_, isCommitSql__, isPoolable, isPreparedStatement_, isQuery__, isRollbackSql__, KEEP_CURRENT_RESULT, materialStatement_, numInvisibleRS_, preparedStatementForAutoGeneratedKeys_, resultSetConcurrency_, resultSetHoldability_, resultSetType_, section_, SET_SCHEMA_STATEMENT, singletonRowData_, specialRegisterArrayList, sqlMode_, statementUUID, TIMEOUT_STATEMENT`

### Fields inherited from interface java.sql.Statement

`CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO`

### Constructor Summary

Constructors
Constructor and Description
`PreparedStatement(Agent agent, Connection connection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes, ClientPooledConnection cpc)` The PreparedStatementConstructor used for jdbc 2 prepared statements with scroll attributes.
`PreparedStatement(Agent agent, Connection connection, String sql, Section section, ClientPooledConnection cpc)` The PreparedStatement constructor used for JDBC 2 positioned update statements.

### Method Summary

Methods
`void` `addBatch()`
`void` `clearParameters()`
`void` `completeDescribeInput(ColumnMetaData parameterMetaData, Sqlca sqlca)`
`void` `completeDescribeOutput(ColumnMetaData resultSetMetaData, Sqlca sqlca)`
`void` `completeLocalCommit(Iterator listenerIterator)`
`void` `completeLocalRollback(Iterator listenerIterator)`
`boolean` `execute()`
`boolean` `execute(String sql)`
`boolean` `execute(String sql, int autoGeneratedKeys)`
`boolean` `execute(String sql, int[] columnIndexes)`
`boolean` `execute(String sql, String[] columnNames)`
`int[]` `executeBatch()`
`int[]` `executeBatchX(boolean supportsQueryBatchRequest, int currExecSeq)`
`ResultSet` `executeQuery()`
`ResultSet` `executeQuery(String sql)`
`int` `executeUpdate()`
`int` `executeUpdate(String sql)`
`int` `executeUpdate(String sql, int autoGeneratedKeys)`
`int` `executeUpdate(String sql, int[] columnIndexes)`
`int` `executeUpdate(String sql, String[] columnNames)`
`protected void` `flowExecute(int executeType, int currExecSeq)`
`protected void` `flowExecuteRead(int executeType, com.pivotal.gemfirexd.internal.client.am.PreparedStatement.FlowExecuteContext ctx)`
`protected com.pivotal.gemfirexd.internal.client.am.PreparedStatement.FlowExecuteContext` `flowExecuteWrite(int executeType, int currExecSeq)`
`protected String` `getClientParamType(int[] paramType)`
`protected String` `getJdbcStatementInterfaceName()` Returns the name of the java.sql interface implemented by this class.
`ResultSetMetaData` `getMetaData()`
`ParameterMetaData` `getParameterMetaData()`
`NetResultSet` `getSuperResultSet()`
`protected void` `initResetPreparedStatement()`
`void` `listenToUnitOfWork()`
`protected static int[]` `makeNewClientParamTypeFrom(int[] sourceClientParamType)`
`protected void` `markClosed(boolean removeListener)` This method cleans up client-side resources held by this Statement.
`void` `readDescribeInput()`
`void` `readDescribeOutput()`
`void` `readExecute()`
`void` `reset(boolean fullReset)`
`void` `resetPreparedStatement(Agent agent, Connection connection, String sql, int type, int concurrency, int holdability, int autoGeneratedKeys, String[] columnNames, int[] columnIndexes)`
`void` `resetPreparedStatement(Agent agent, Connection connection, String sql, Section section)`
`void` `resetPreparedStatement(Agent agent, Connection connection, String sql, Section section, ColumnMetaData parameterMetaData, ColumnMetaData resultSetMetaData)`
`protected int[]` `setAndStoreClientParamType(int[] clientParamtype)`
`void` `setArray(int parameterIndex, Array x)`
`void` `setAsciiStream(int parameterIndex, InputStream x)` Sets the designated parameter to the given input stream.
`void` `setAsciiStream(int parameterIndex, InputStream x, int length)` We do this inefficiently and read it all in here.
`void` `setAsciiStream(int parameterIndex, InputStream x, long length)` We do this inefficiently and read it all in here.
`void` `setBigDecimal(int parameterIndex, BigDecimal x)`
`void` `setBinaryStream(int parameterIndex, InputStream x)` Sets the designated parameter to the given input stream.
`void` `setBinaryStream(int parameterIndex, InputStream x, int length)` sets the parameter to the Binary Stream object
`void` `setBinaryStream(int parameterIndex, InputStream x, long length)` sets the parameter to the Binary Stream object
`protected void` `setBinaryStreamX(int parameterIndex, InputStream x, int length)`
`void` `setBlob(int parameterIndex, Blob x)`
`void` `setBlob(int parameterIndex, InputStream inputStream)` Sets the designated parameter to a `InputStream` object.
`void` `setBlob(int parameterIndex, InputStream inputStream, long length)` Sets the designated parameter to a InputStream object.
`void` `setBlobX(int parameterIndex, Blob x)`
`void` `setBoolean(int parameterIndex, boolean x)`
`void` `setByte(int parameterIndex, byte x)`
`void` `setBytes(int parameterIndex, byte[] x)`
`void` `setBytesX(int parameterIndex, byte[] x)`
`void` `setCharacterStream(int parameterIndex, Reader x)` Sets the designated parameter to the given `Reader` object.
`void` `setCharacterStream(int parameterIndex, Reader x, int length)` Sets the designated parameter to the given Reader, which will have the specified number of bytes.
`void` `setCharacterStream(int parameterIndex, Reader x, long length)` Sets the designated parameter to the given Reader, which will have the specified number of bytes.
`void` `setClob(int parameterIndex, Clob x)`
`void` `setClob(int parameterIndex, Reader reader)` Sets the designated parameter to a `Reader` object.
`void` `setClob(int parameterIndex, Reader reader, long length)` Sets the designated parameter to a Reader object.
`void` `setDate(int parameterIndex, Date x)`
`void` `setDate(int parameterIndex, Date x, Calendar calendar)`
`void` `setDouble(int parameterIndex, double x)`
`void` `setFloat(int parameterIndex, float x)`
`void` `setInt(int parameterIndex, int x)`
`void` `setLong(int parameterIndex, long x)`
`void` `setNull(int parameterIndex, int jdbcType)`
`void` `setNull(int parameterIndex, int jdbcType, String typeName)`
`void` `setObject(int parameterIndex, Object x)`
`void` `setObject(int parameterIndex, Object x, int targetJdbcType)`
`void` `setObject(int parameterIndex, Object x, int targetJdbcType, int scale)`
`void` `setRef(int parameterIndex, Ref x)`
`void` `setShort(int parameterIndex, short x)`
`void` `setString(int parameterIndex, String x)`
`void` `setTime(int parameterIndex, Time x)`
`void` `setTime(int parameterIndex, Time x, Calendar calendar)`
`void` `setTimestamp(int parameterIndex, Timestamp x)`
`void` `setTimestamp(int parameterIndex, Timestamp x, Calendar calendar)`
`void` `setUnicodeStream(int parameterIndex, InputStream x, int length)` Deprecated.
`void` `setURL(int parameterIndex, URL x)`
`protected ResultSet` `singleHopPrepStmntExecuteQuery()`
`void` `writeDescribeInput(Section section)`
`void` `writeDescribeOutput(Section section)`
`void` `writeExecute(Section section, ColumnMetaData parameterMetaData, Object[] inputs, int numInputColumns, boolean outputExpected, boolean chainedWritesFollowingSetLob)`

### Methods inherited from class com.pivotal.gemfirexd.internal.client.am.Statement

`accumulateWarning, addBatch, cancel, checkForDuplicateCursorName, checkForStoredProcResultSetCount, cleanSingleHopPrepStmnt, clearBatch, clearWarnings, close, closeX, completeExecute, completeExecuteCall, completeExecuteCall, completeExecuteCallOpenQuery, completeExecuteImmediate, completeExecuteSetStatement, completeOpenQuery, completePrepare, completePrepareDescribeOutput, completeSqlca, completeStatementIDRead, finalize, getConnection, getConnectionCallbackInterface, getFetchDirection, getFetchSize, getGeneratedKeys, getGuessedResultSetMetaData, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getSection, getSqlWarnings, getUpdateCount, getWarnings, initResetPreparedStatement, isCallMode, isClosed, isClosedNoThrow, isPoolable, isQueryMode, isWrapperFor, jdbc3FeatureNotSupported, jdbc3FeatureNotSupported, markAutoCommitted, needStatementUUID, readExecuteCall, readExecuteImmediate, readExecuteImmediateForBatch, readOpenQuery, readPrepare, readPrepareDescribeOutput, readSetSpecialRegister, readStatementID, removeClientCursorNameFromCache, resetStatement, resetStatement, resultSetCommitting, resultSetCommitting, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setOwner, setPoolable, setQueryTimeout, setupCursorNameCacheAndMappings, setUpdateCount, substituteClientCursorNameWithServerCursorName, upperCaseProcedureName, writeExecuteCall, writeExecuteImmediate, writeGetStmtUUID, writeOpenQuery, writePrepare, writePrepareDescribeOutput, writeSetSpecialRegister`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.sql.PreparedStatement

`setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setRowId, setSQLXML`

### Methods inherited from interface java.sql.Statement

`addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout`

### Methods inherited from interface java.sql.Wrapper

`isWrapperFor, unwrap`

### Methods inherited from interface com.pivotal.gemfirexd.internal.client.am.StatementCallbackInterface

`accumulateWarning, completeExecute, completeExecuteCall, completeExecuteCall, completeExecuteCallOpenQuery, completeExecuteImmediate, completeExecuteSetStatement, completeOpenQuery, completePrepare, completePrepareDescribeOutput, completeSqlca, completeStatementIDRead, getConnectionCallbackInterface, getGuessedResultSetMetaData, getSection`

### Field Detail

#### materialPreparedStatement_

    public MaterialPreparedStatement materialPreparedStatement_

#### sql_

    public String sql_

#### outputRegistered_

    public boolean outputRegistered_

#### parameters_

    public Object[] parameters_

#### parameterMetaData_

    public ColumnMetaData parameterMetaData_

#### pooledConnection_

    protected final ClientPooledConnection pooledConnection_

#### superFlowExecuteCalled_

    protected boolean superFlowExecuteCalled_

#### singleHopInfoAlreadyFetched_

    protected boolean singleHopInfoAlreadyFetched_

#### clientParamTypeAtFirstExecute

    protected int[] clientParamTypeAtFirstExecute

#### internalPreparedStatement

    public volatile boolean internalPreparedStatement

### Constructor Detail

#### PreparedStatement

    public PreparedStatement(Agent agent,
                     Connection connection,
                     String sql,
                     Section section,
                     ClientPooledConnection cpc)
                      throws SqlException

The PreparedStatement constructor used for JDBC 2 positioned update statements. Called by material statement constructors. It has the ClientPooledConnection as one of its parameters this is used to raise the Statement Events when the prepared statement is closed

Parameters:
  `agent` - The instance of NetAgent associated with this CallableStatement object.
  `connection` - The connection object associated with this PreparedStatement Object.
  `sql` - A String object that is the SQL statement to be sent to the database.
  `section` - Section
  `cpc` - The ClientPooledConnection wraps the underlying physical connection associated with this prepared statement. It is used to pass the Statement closed and the Statement error occurred events that occur back to the ClientPooledConnection.
Throws:
  `SqlException`

#### PreparedStatement

    public PreparedStatement(Agent agent,
                     Connection connection,
                     String sql,
                     int type,
                     int concurrency,
                     int holdability,
                     int autoGeneratedKeys,
                     String[] columnNames,
                     int[] columnIndexes,
                     ClientPooledConnection cpc)
                      throws SqlException

The PreparedStatementConstructor used for jdbc 2 prepared statements with scroll attributes. Called by material statement constructors. It has the ClientPooledConnection as one of its parameters this is used to raise the Statement Events when the prepared statement is closed

Parameters:
  `agent` - The instance of NetAgent associated with this CallableStatement object.
  `connection` - The connection object associated with this PreparedStatement Object.
  `sql` - A String object that is the SQL statement to be sent to the database.
  `type` - One of the ResultSet type constants.
  `concurrency` - One of the ResultSet concurrency constants.
  `holdability` - One of the ResultSet holdability constants.
  `autoGeneratedKeys` - a flag indicating whether auto-generated keys should be returned.
  `columnNames` - an array of column names indicating the columns that should be returned from the inserted row or rows.
  `columnIndexes` - an array of column names indicating the columns that should be returned from the inserted row.
  `cpc` - The ClientPooledConnection wraps the underlying physical connection associated with this prepared statement it is used to pass the Statement closed and the Statement error occurred events that occur back to the ClientPooledConnection.
Throws:
  `SqlException`

### Method Detail

#### initResetPreparedStatement

    protected void initResetPreparedStatement()

#### reset

    public void reset(boolean fullReset)
               throws SqlException

Overrides:
  `reset` in class `Statement`
Throws:
  `SqlException`

#### getSuperResultSet

    public NetResultSet getSuperResultSet()
                                   throws SQLException

Throws:
  `SQLException`

#### setAndStoreClientParamType

    protected int[] setAndStoreClientParamType(int[] clientParamtype)

Overrides:
  `setAndStoreClientParamType` in class `Statement`

#### makeNewClientParamTypeFrom

    protected static int[] makeNewClientParamTypeFrom(int[] sourceClientParamType)

#### getClientParamType

    protected String getClientParamType(int[] paramType)

#### resetPreparedStatement

    public void resetPreparedStatement(Agent agent,
                              Connection connection,
                              String sql,
                              Section section)
                                throws SqlException

Throws:
  `SqlException`

#### resetPreparedStatement

    public void resetPreparedStatement(Agent agent,
                              Connection connection,
                              String sql,
                              int type,
                              int concurrency,
                              int holdability,
                              int autoGeneratedKeys,
                              String[] columnNames,
                              int[] columnIndexes)
                                throws SqlException

Throws:
  `SqlException`

#### resetPreparedStatement

    public void resetPreparedStatement(Agent agent,
                              Connection connection,
                              String sql,
                              Section section,
                              ColumnMetaData parameterMetaData,
                              ColumnMetaData resultSetMetaData)
                                throws SqlException

Throws:
  `SqlException`

#### execute

    public boolean execute(String sql)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `Statement`
Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery(String sql)
                           throws SQLException

Specified by:
  `executeQuery` in interface `Statement`
Overrides:
  `executeQuery` in class `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate(String sql)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `Statement`
Throws:
  `SQLException`

#### executeQuery

    public ResultSet executeQuery()
                           throws SQLException

Specified by:
  `executeQuery` in interface `PreparedStatement`
Throws:
  `SQLException`

#### singleHopPrepStmntExecuteQuery

    protected ResultSet singleHopPrepStmntExecuteQuery()
                                                throws SQLException

Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate()
                      throws SQLException

Specified by:
  `executeUpdate` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setNull

    public void setNull(int parameterIndex,
               int jdbcType)
                 throws SQLException

Specified by:
  `setNull` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setNull

    public void setNull(int parameterIndex,
               int jdbcType,
               String typeName)
                 throws SQLException

Specified by:
  `setNull` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setBoolean

    public void setBoolean(int parameterIndex,
                  boolean x)
                    throws SQLException

Specified by:
  `setBoolean` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setByte

    public void setByte(int parameterIndex,
               byte x)
                 throws SQLException

Specified by:
  `setByte` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setShort

    public void setShort(int parameterIndex,
                short x)
                  throws SQLException

Specified by:
  `setShort` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setInt

    public void setInt(int parameterIndex,
              int x)
                throws SQLException

Specified by:
  `setInt` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setLong

    public void setLong(int parameterIndex,
               long x)
                 throws SQLException

Specified by:
  `setLong` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setFloat

    public void setFloat(int parameterIndex,
                float x)
                  throws SQLException

Specified by:
  `setFloat` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setDouble

    public void setDouble(int parameterIndex,
                 double x)
                   throws SQLException

Specified by:
  `setDouble` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setBigDecimal

    public void setBigDecimal(int parameterIndex,
                     BigDecimal x)
                       throws SQLException

Specified by:
  `setBigDecimal` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setDate

    public void setDate(int parameterIndex,
               Date x)
                 throws SQLException

Specified by:
  `setDate` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setDate

    public void setDate(int parameterIndex,
               Date x,
               Calendar calendar)
                 throws SQLException

Specified by:
  `setDate` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setTime

    public void setTime(int parameterIndex,
               Time x)
                 throws SQLException

Specified by:
  `setTime` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setTime

    public void setTime(int parameterIndex,
               Time x,
               Calendar calendar)
                 throws SQLException

Specified by:
  `setTime` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setTimestamp

    public void setTimestamp(int parameterIndex,
                    Timestamp x)
                      throws SQLException

Specified by:
  `setTimestamp` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setTimestamp

    public void setTimestamp(int parameterIndex,
                    Timestamp x,
                    Calendar calendar)
                      throws SQLException

Specified by:
  `setTimestamp` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setString

    public void setString(int parameterIndex,
                 String x)
                   throws SQLException

Specified by:
  `setString` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setBytes

    public void setBytes(int parameterIndex,
                byte[] x)
                  throws SQLException

Specified by:
  `setBytes` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setBytesX

    public void setBytesX(int parameterIndex,
                 byte[] x)
                   throws SqlException

Throws:
  `SqlException`

#### setBinaryStream

    public void setBinaryStream(int parameterIndex,
                       InputStream x,
                       long length)
                         throws SQLException

sets the parameter to the Binary Stream object

Specified by:
  `setBinaryStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the java input stream which contains the binary parameter value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - thrown on failure.

#### setBinaryStream

    public void setBinaryStream(int parameterIndex,
                       InputStream x,
                       int length)
                         throws SQLException

sets the parameter to the Binary Stream object

Specified by:
  `setBinaryStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the java input stream which contains the binary parameter value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - thrown on failure.

#### setBinaryStreamX

    protected void setBinaryStreamX(int parameterIndex,
                        InputStream x,
                        int length)
                             throws SqlException

Throws:
  `SqlException`

#### setAsciiStream

    public void setAsciiStream(int parameterIndex,
                      InputStream x,
                      long length)
                        throws SQLException

We do this inefficiently and read it all in here. The target type is assumed to be a String.

Specified by:
  `setAsciiStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the java input stream which contains the ASCII parameter value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - thrown on failure.

#### setAsciiStream

    public void setAsciiStream(int parameterIndex,
                      InputStream x,
                      int length)
                        throws SQLException

We do this inefficiently and read it all in here. The target type is assumed to be a String.

Specified by:
  `setAsciiStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the java input stream which contains the ASCII parameter value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - thrown on failure.

#### setUnicodeStream

    public void setUnicodeStream(int parameterIndex,
                        InputStream x,
                        int length)
                          throws SQLException

Deprecated.
Sets the specified parameter to the given input stream. Deprecated in JDBC 3.0 and this method will always just throw a feature not implemented exception.

Specified by:
  `setUnicodeStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the java input stream which contains the UNICODE parameter value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - throws feature not implemented.

#### setCharacterStream

    public void setCharacterStream(int parameterIndex,
                          Reader x)
                            throws SQLException

Sets the designated parameter to the given `Reader` object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a `java.io.Reader` object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Specified by:
  `setCharacterStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the `java.io.Reader` object that contains the Unicode data
Throws:
  `SQLException` - if a database access error occurs or this method is called on a closed `PreparedStatement`

#### setCharacterStream

    public void setCharacterStream(int parameterIndex,
                          Reader x,
                          long length)
                            throws SQLException

Sets the designated parameter to the given Reader, which will have the specified number of bytes.

Specified by:
  `setCharacterStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the index of the parameter to which this set method is applied
  `x` - the java Reader which contains the UNICODE value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - thrown on failure.

#### setCharacterStream

    public void setCharacterStream(int parameterIndex,
                          Reader x,
                          int length)
                            throws SQLException

Sets the designated parameter to the given Reader, which will have the specified number of bytes.

Specified by:
  `setCharacterStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the index of the parameter to which this set method is applied
  `x` - the java Reader which contains the UNICODE value
  `length` - the number of bytes in the stream
Throws:
  `SQLException` - thrown on failure.

#### setBlob

    public void setBlob(int parameterIndex,
               Blob x)
                 throws SQLException

Specified by:
  `setBlob` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setBlobX

    public void setBlobX(int parameterIndex,
                Blob x)
                  throws SqlException

Throws:
  `SqlException`

#### setClob

    public void setClob(int parameterIndex,
               Clob x)
                 throws SQLException

Specified by:
  `setClob` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setArray

    public void setArray(int parameterIndex,
                Array x)
                  throws SQLException

Specified by:
  `setArray` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setRef

    public void setRef(int parameterIndex,
              Ref x)
                throws SQLException

Specified by:
  `setRef` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setObject

    public void setObject(int parameterIndex,
                 Object x)
                   throws SQLException

Specified by:
  `setObject` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setObject

    public void setObject(int parameterIndex,
                 Object x,
                 int targetJdbcType)
                   throws SQLException

Specified by:
  `setObject` in interface `PreparedStatement`
Throws:
  `SQLException`

#### setObject

    public void setObject(int parameterIndex,
                 Object x,
                 int targetJdbcType,
                 int scale)
                   throws SQLException

Specified by:
  `setObject` in interface `PreparedStatement`
Throws:
  `SQLException`

#### clearParameters

    public void clearParameters()
                         throws SQLException

Specified by:
  `clearParameters` in interface `PreparedStatement`
Throws:
  `SQLException`

#### execute

    public boolean execute()
                    throws SQLException

Specified by:
  `execute` in interface `PreparedStatement`
Throws:
  `SQLException`

#### addBatch

    public void addBatch()
                  throws SQLException

Specified by:
  `addBatch` in interface `PreparedStatement`
Throws:
  `SQLException`

#### executeBatch

    public int[] executeBatch()
                       throws SQLException,
                              BatchUpdateException

Specified by:
  `executeBatch` in interface `Statement`
Overrides:
  `executeBatch` in class `Statement`
Throws:
  `SQLException`
  `BatchUpdateException`

#### getMetaData

    public ResultSetMetaData getMetaData()
                                  throws SQLException

Specified by:
  `getMetaData` in interface `PreparedStatement`
Throws:
  `SQLException`

#### execute

    public boolean execute(String sql,
                  int autoGeneratedKeys)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute(String sql,
                  String[] columnNames)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `Statement`
Throws:
  `SQLException`

#### execute

    public boolean execute(String sql,
                  int[] columnIndexes)
                    throws SQLException

Specified by:
  `execute` in interface `Statement`
Overrides:
  `execute` in class `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate(String sql,
                    int autoGeneratedKeys)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate(String sql,
                    String[] columnNames)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `Statement`
Throws:
  `SQLException`

#### executeUpdate

    public int executeUpdate(String sql,
                    int[] columnIndexes)
                      throws SQLException

Specified by:
  `executeUpdate` in interface `Statement`
Overrides:
  `executeUpdate` in class `Statement`
Throws:
  `SQLException`

#### setURL

    public void setURL(int parameterIndex,
              URL x)
                throws SQLException

Specified by:
  `setURL` in interface `PreparedStatement`
Throws:
  `SQLException`

#### getParameterMetaData

    public ParameterMetaData getParameterMetaData()
                                           throws SQLException

Specified by:
  `getParameterMetaData` in interface `PreparedStatement`
Throws:
  `SQLException`

#### writeExecute

    public void writeExecute(Section section,
                    ColumnMetaData parameterMetaData,
                    Object[] inputs,
                    int numInputColumns,
                    boolean outputExpected,
                    boolean chainedWritesFollowingSetLob)
                      throws SqlException

Throws:
  `SqlException`

#### readExecute

    public void readExecute()
                     throws SqlException

Throws:
  `SqlException`

#### writeDescribeInput

    public void writeDescribeInput(Section section)
                            throws SqlException

Throws:
  `SqlException`

#### readDescribeInput

    public void readDescribeInput()
                           throws SqlException

Throws:
  `SqlException`

#### completeDescribeInput

    public void completeDescribeInput(ColumnMetaData parameterMetaData,
                             Sqlca sqlca)

Specified by:
  `completeDescribeInput` in interface `PreparedStatementCallbackInterface`

#### writeDescribeOutput

    public void writeDescribeOutput(Section section)
                             throws SqlException

Throws:
  `SqlException`

#### readDescribeOutput

    public void readDescribeOutput()
                            throws SqlException

Throws:
  `SqlException`

#### completeDescribeOutput

    public void completeDescribeOutput(ColumnMetaData resultSetMetaData,
                              Sqlca sqlca)

Specified by:
  `completeDescribeOutput` in interface `PreparedStatementCallbackInterface`

#### flowExecuteWrite

    protected com.pivotal.gemfirexd.internal.client.am.PreparedStatement.FlowExecuteContext flowExecuteWrite(int executeType,
                                                                                                 int currExecSeq)
                                                                                                      throws SqlException

Throws:
  `SqlException`

#### flowExecuteRead

    protected final void flowExecuteRead(int executeType,
                       com.pivotal.gemfirexd.internal.client.am.PreparedStatement.FlowExecuteContext ctx)
                                  throws SqlException

Throws:
  `SqlException`

#### flowExecute

    protected void flowExecute(int executeType,
                   int currExecSeq)
                        throws SqlException

Throws:
  `SqlException`

#### executeBatchX

    public int[] executeBatchX(boolean supportsQueryBatchRequest,
                      int currExecSeq)
                        throws SqlException,
                               SQLException,
                               BatchUpdateException

Throws:
  `SqlException`
  `SQLException`
  `BatchUpdateException`

#### listenToUnitOfWork

    public void listenToUnitOfWork()

Specified by:
  `listenToUnitOfWork` in interface `UnitOfWorkListener`
Overrides:
  `listenToUnitOfWork` in class `Statement`

#### completeLocalCommit

    public void completeLocalCommit(Iterator listenerIterator)

Specified by:
  `completeLocalCommit` in interface `UnitOfWorkListener`
Overrides:
  `completeLocalCommit` in class `Statement`

#### completeLocalRollback

    public void completeLocalRollback(Iterator listenerIterator)

Specified by:
  `completeLocalRollback` in interface `UnitOfWorkListener`
Overrides:
  `completeLocalRollback` in class `Statement`

#### getJdbcStatementInterfaceName

    protected String getJdbcStatementInterfaceName()

Returns the name of the java.sql interface implemented by this class.

Overrides:
  `getJdbcStatementInterfaceName` in class `Statement`
Returns:
  name of java.sql interface

#### markClosed

    protected void markClosed(boolean removeListener)

Description copied from class: `Statement`
This method cleans up client-side resources held by this Statement. If removeListener is true, the Statement is removed from open statements list and PreparedStatement is also removed from commit and rollback listeners list. This is called from the close methods.

Parameters:
  `removeListener` - if true the Statement will be removed from the open statements list and PreparedStatement will also be removed from commit and rollback listeners list in `com.pivotal.gemfirexd.internal.client.am.Connection`.

#### setAsciiStream

    public void setAsciiStream(int parameterIndex,
                      InputStream x)
                        throws SQLException

Sets the designated parameter to the given input stream. When a very large ASCII value is input to a `LONGVARCHAR` parameter, it may be more practical to send it via a `java.io.InputStream`. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format.

Specified by:
  `setAsciiStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the Java input stream that contains the ASCII parameter value
Throws:
  `SQLException` - if a database access error occurs or this method is called on a closed `PreparedStatement`

#### setBinaryStream

    public void setBinaryStream(int parameterIndex,
                       InputStream x)
                         throws SQLException

Sets the designated parameter to the given input stream. When a very large binary value is input to a `LONGVARBINARY` parameter, it may be more practical to send it via a `java.io.InputStream` object. The data will be read from the stream as needed until end-of-file is reached.

Specified by:
  `setBinaryStream` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - the first parameter is 1, the second is 2, ...
  `x` - the java input stream which contains the binary parameter value
Throws:
  `SQLException` - if a database access error occurs or this method is called on a closed `PreparedStatement`

#### setClob

    public void setClob(int parameterIndex,
               Reader reader)
                 throws SQLException

Sets the designated parameter to a `Reader` object.

Specified by:
  `setClob` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - index of the first parameter is 1, the second is 2, ...
  `reader` - an object that contains the data to set the parameter value to.
Throws:
  `SQLException` - if parameterIndex does not correspond to a parameter marker in the SQL statement; if a database access error occurs; this method is called on a closed PreparedStatementor if parameterIndex does not correspond to a parameter marker in the SQL statement

#### setClob

    public void setClob(int parameterIndex,
               Reader reader,
               long length)
                 throws SQLException

Sets the designated parameter to a Reader object.

Specified by:
  `setClob` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - index of the first parameter is 1, the second is 2, ...
  `reader` - An object that contains the data to set the parameter value to.
  `length` - the number of characters in the parameter data.
Throws:
  `SQLException` - if parameterIndex does not correspond to a parameter marker in the SQL statement, or if the length specified is less than zero.

#### setBlob

    public void setBlob(int parameterIndex,
               InputStream inputStream)
                 throws SQLException

Sets the designated parameter to a `InputStream` object. This method differs from the `setBinaryStream(int, InputStream)` method because it informs the driver that the parameter value should be sent to the server as a `BLOB`. When the `setBinaryStream` method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a `LONGVARBINARY` or a `BLOB`

Specified by:
  `setBlob` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - index of the first parameter is 1, the second is 2, ...
  `inputStream` - an object that contains the data to set the parameter value to.
Throws:
  `SQLException` - if a database access error occurs, this method is called on a closed `PreparedStatement` or if `parameterIndex` does not correspond to a parameter marker in the SQL statement

#### setBlob

    public void setBlob(int parameterIndex,
               InputStream inputStream,
               long length)
                 throws SQLException

Sets the designated parameter to a InputStream object.

Specified by:
  `setBlob` in interface `PreparedStatement`
Parameters:
  `parameterIndex` - index of the first parameter is 1, the second is 2, ...
  `inputStream` - An object that contains the data to set the parameter value to.
  `length` - the number of bytes in the parameter data.
Throws:
  `SQLException` - if parameterIndex does not correspond to a parameter marker in the SQL statement, if the length specified is less than zero or if the number of bytes in the inputstream does not match the specfied length.