com.pivotal.gemfirexd.internal.client.am

## Class PreparedStatement40

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

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

    public class PreparedStatement40
    extends SingleHopPreparedStatement

### Field Summary

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

`crossConverter`

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

`clientParamTypeAtFirstExecute, internalPreparedStatement, materialPreparedStatement_, outputRegistered_, parameterMetaData_, parameters_, pooledConnection_, singleHopInfoAlreadyFetched_, sql_, 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
`PreparedStatement40(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 4 prepared statements with scroll attributes.
`PreparedStatement40(Agent agent, Connection connection, String sql, Section section, ClientPooledConnection cpc)` The PreparedStatement used for JDBC 4 positioned update statements.

### Method Summary

Methods
`void` `closeOnCompletion()`
`boolean` `isCloseOnCompletion()`
`void` `setNCharacterStream(int parameterIndex, Reader value)`
`void` `setNCharacterStream(int index, Reader value, long length)`
`void` `setNClob(int index, NClob value)`
`void` `setNClob(int parameterIndex, Reader reader)`
`void` `setNClob(int parameterIndex, Reader reader, long length)`
`void` `setNString(int index, String value)`
`void` `setRowId(int parameterIndex, RowId x)`
`void` `setSQLXML(int parameterIndex, SQLXML xmlObject)`
`<T> T` `unwrap(Class<T> interfaces)` Returns `this` if this class implements the interface

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

`cleanSingleHopPrepStmnt, createNewSetForTesting, execute, executeQuery, executeUpdate, flowExecute, getResultSet, getRoutingObjectSet, getSuperResultSet, initialize, returnParameters, setRoutingObjectSetToNull, singleHopPrepStmntExecuteQuery, sleepForRetry, wasSingleHopCalledInExecution`

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

`addBatch, clearParameters, completeDescribeInput, completeDescribeOutput, completeLocalCommit, completeLocalRollback, execute, execute, execute, execute, executeBatch, executeBatchX, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, flowExecuteRead, flowExecuteWrite, getClientParamType, getJdbcStatementInterfaceName, getMetaData, getParameterMetaData, initResetPreparedStatement, listenToUnitOfWork, makeNewClientParamTypeFrom, markClosed, readDescribeInput, readDescribeOutput, readExecute, reset, resetPreparedStatement, resetPreparedStatement, resetPreparedStatement, setAndStoreClientParamType, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBinaryStreamX, setBlob, setBlob, setBlob, setBlobX, setBoolean, setByte, setBytes, setBytesX, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, writeDescribeInput, writeDescribeOutput, writeExecute`

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

`accumulateWarning, addBatch, cancel, checkForDuplicateCursorName, checkForStoredProcResultSetCount, 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, 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.Statement

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

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

`isWrapperFor`

### 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`

### Constructor Detail

#### PreparedStatement40

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

The PreparedStatement used for JDBC 4 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`

#### PreparedStatement40

    public PreparedStatement40(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 4 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 indexes 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

#### setRowId

    public void setRowId(int parameterIndex,
                RowId x)
                  throws SQLException

Throws:
  `SQLException`

#### setNString

    public void setNString(int index,
                  String value)
                    throws SQLException

Throws:
  `SQLException`

#### setNCharacterStream

    public void setNCharacterStream(int parameterIndex,
                           Reader value)
                             throws SQLException

Throws:
  `SQLException`

#### setNCharacterStream

    public void setNCharacterStream(int index,
                           Reader value,
                           long length)
                             throws SQLException

Throws:
  `SQLException`

#### setNClob

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

Throws:
  `SQLException`

#### setNClob

    public void setNClob(int index,
                NClob value)
                  throws SQLException

Throws:
  `SQLException`

#### setNClob

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

Throws:
  `SQLException`

#### setSQLXML

    public void setSQLXML(int parameterIndex,
                 SQLXML xmlObject)
                   throws SQLException

Throws:
  `SQLException`

#### unwrap

    public <T> T unwrap(Class<T> interfaces)
             throws SQLException

Returns `this` if this class implements the interface

Parameters:
  `interfaces` - a Class defining an interface
Returns:
  an object that implements the interface
Throws:
  `java.sql.SQLExption` - if no object if found that implements the interface
  `SQLException`

#### closeOnCompletion

    public void closeOnCompletion()
                           throws SQLException

Throws:
  `SQLException`

#### isCloseOnCompletion

    public boolean isCloseOnCompletion()
                                throws SQLException

Throws:
  `SQLException`