com.ibm.jtopenlite.database.jdbc
Class JDBCStatement
- java.lang.Object
-
- com.ibm.jtopenlite.database.jdbc.JDBCStatement
-
- All Implemented Interfaces:
- DatabaseSQLCommunicationsAreaCallback, java.sql.Statement, java.sql.Wrapper
- Direct Known Subclasses:
- JDBCPreparedStatement
public class JDBCStatement extends java.lang.Object implements java.sql.Statement, DatabaseSQLCommunicationsAreaCallback
-
-
Field Summary
Fields Modifier and Type Field and Description static int
TYPE_BLOCKED_INSERT
static int
TYPE_CALL
static int
TYPE_COMMIT
static int
TYPE_CONNECT
static int
TYPE_INSERT_UPDATE_DELETE
static int
TYPE_ROLLBACK
static int
TYPE_SELECT
static int
TYPE_UNKNOWN
-
Constructor Summary
Constructors Constructor and Description JDBCStatement(JDBCConnection conn, java.lang.String statementName, java.lang.String cursorName, int rpbID)
-
Method Summary
Methods Modifier and Type Method and Description void
addBatch(java.lang.String sql)
Not implemented.void
cancel()
Not implemented.void
clearBatch()
Not implemented.void
clearWarnings()
Warning are not supported.void
close()
boolean
execute(java.lang.String sql)
boolean
execute(java.lang.String sql, int autoGeneratedKeys)
boolean
execute(java.lang.String sql, int[] columnIndices)
Not implemented.boolean
execute(java.lang.String sql, java.lang.String[] columnNames)
Not implemented.int[]
executeBatch()
Not implemented.java.sql.ResultSet
executeQuery(java.lang.String sql)
int
executeUpdate(java.lang.String sql)
int
executeUpdate(java.lang.String sql, int autoGeneratedKeys)
int
executeUpdate(java.lang.String sql, int[] columnIndices)
Not implemented.int
executeUpdate(java.lang.String sql, java.lang.String[] columnNames)
Not implemented.java.sql.Connection
getConnection()
int
getFetchDirection()
int
getFetchSize()
java.sql.ResultSet
getGeneratedKeys()
int
getMaxFieldSize()
Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.int
getMaxRows()
Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.boolean
getMoreResults()
Not implemented.boolean
getMoreResults(int current)
Not implemented.int
getQueryTimeout()
Retrieves the number of seconds the driver will wait for a Statement object to executejava.sql.ResultSet
getResultSet()
int
getResultSetConcurrency()
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.int
getResultSetHoldability()
Retrieves the result set holdability for ResultSet objects generated by this Statement object.int
getResultSetType()
static int
getStatementType(java.lang.String sql)
int
getUpdateCount()
java.sql.SQLWarning
getWarnings()
Not implemented, but we return null to avoid problems with existing applicationsboolean
isClosed()
boolean
isPoolable()
void
newSQLCommunicationsAreaData(int sqlCode, java.lang.String sqlState, java.lang.String generatedKey, int updateCount, int resultSetsCount)
void
setCatalog(java.lang.String catalog)
void
setCursorName(java.lang.String name)
Not implemented.protected void
setCursorNameInternal(java.lang.String cursorName)
void
setEscapeProcessing(boolean enable)
Not implemented.void
setFetchDirection(int direction)
Not implemented.void
setFetchSize(int rows)
void
setMaxFieldSize(int max)
Not implemented.void
setMaxRows(int max)
Not implemented.void
setPoolable(boolean poolable)
void
setQueryTimeout(int seconds)
Not implemented.
-
-
-
Field Detail
-
TYPE_UNKNOWN
public static final int TYPE_UNKNOWN
- See Also:
- Constant Field Values
-
TYPE_INSERT_UPDATE_DELETE
public static final int TYPE_INSERT_UPDATE_DELETE
- See Also:
- Constant Field Values
-
TYPE_SELECT
public static final int TYPE_SELECT
- See Also:
- Constant Field Values
-
TYPE_CALL
public static final int TYPE_CALL
- See Also:
- Constant Field Values
-
TYPE_COMMIT
public static final int TYPE_COMMIT
- See Also:
- Constant Field Values
-
TYPE_ROLLBACK
public static final int TYPE_ROLLBACK
- See Also:
- Constant Field Values
-
TYPE_CONNECT
public static final int TYPE_CONNECT
- See Also:
- Constant Field Values
-
TYPE_BLOCKED_INSERT
public static final int TYPE_BLOCKED_INSERT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JDBCStatement
public JDBCStatement(JDBCConnection conn, java.lang.String statementName, java.lang.String cursorName, int rpbID) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
-
Method Detail
-
getStatementType
public static int getStatementType(java.lang.String sql) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
newSQLCommunicationsAreaData
public void newSQLCommunicationsAreaData(int sqlCode, java.lang.String sqlState, java.lang.String generatedKey, int updateCount, int resultSetsCount)
- Specified by:
newSQLCommunicationsAreaData
in interfaceDatabaseSQLCommunicationsAreaCallback
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException
Not implemented.- Specified by:
addBatch
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
cancel
public void cancel() throws java.sql.SQLException
Not implemented.- Specified by:
cancel
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
clearBatch
public void clearBatch() throws java.sql.SQLException
Not implemented.- Specified by:
clearBatch
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
clearWarnings
public void clearWarnings() throws java.sql.SQLException
Warning are not supported. This is a noop.- Specified by:
clearWarnings
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
close
public void close() throws java.sql.SQLException
- Specified by:
close
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, int[] columnIndices) throws java.sql.SQLException
Not implemented.- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
execute
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
Not implemented.- Specified by:
execute
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeBatch
public int[] executeBatch() throws java.sql.SQLException
Not implemented.- Specified by:
executeBatch
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
- Specified by:
executeQuery
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLException
- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, int[] columnIndices) throws java.sql.SQLException
Not implemented.- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLException
Not implemented.- Specified by:
executeUpdate
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getConnection
public java.sql.Connection getConnection() throws java.sql.SQLException
- Specified by:
getConnection
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getFetchDirection
public int getFetchDirection() throws java.sql.SQLException
- Specified by:
getFetchDirection
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getFetchSize
public int getFetchSize() throws java.sql.SQLException
- Specified by:
getFetchSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getGeneratedKeys
public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
- Specified by:
getGeneratedKeys
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getMaxFieldSize
public int getMaxFieldSize() throws java.sql.SQLException
Retrieves the maximum number of bytes that can be returned for character and binary column values in a ResultSet object produced by this Statement object.- Specified by:
getMaxFieldSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getMaxRows
public int getMaxRows() throws java.sql.SQLException
Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.- Specified by:
getMaxRows
in interfacejava.sql.Statement
- Returns:
- 0 -- there is no limit
- Throws:
java.sql.SQLException
-
getMoreResults
public boolean getMoreResults() throws java.sql.SQLException
Not implemented.- Specified by:
getMoreResults
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getMoreResults
public boolean getMoreResults(int current) throws java.sql.SQLException
Not implemented.- Specified by:
getMoreResults
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getQueryTimeout
public int getQueryTimeout() throws java.sql.SQLException
Retrieves the number of seconds the driver will wait for a Statement object to execute- Specified by:
getQueryTimeout
in interfacejava.sql.Statement
- Returns:
- 0: This driver does not support query timeout. .
- Throws:
java.sql.SQLException
-
getResultSet
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
- Specified by:
getResultSet
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getResultSetConcurrency
public int getResultSetConcurrency() throws java.sql.SQLException
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.- Specified by:
getResultSetConcurrency
in interfacejava.sql.Statement
- Returns:
- ResultSet.CONCUR_READ_ONLY: This driver only supports READ_ONLY cursors.
- Throws:
java.sql.SQLException
-
getResultSetHoldability
public int getResultSetHoldability() throws java.sql.SQLException
Retrieves the result set holdability for ResultSet objects generated by this Statement object. returns ResultSet.HOLD_CURSORS_OVER_COMMIT- Specified by:
getResultSetHoldability
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getResultSetType
public int getResultSetType() throws java.sql.SQLException
- Specified by:
getResultSetType
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getUpdateCount
public int getUpdateCount() throws java.sql.SQLException
- Specified by:
getUpdateCount
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
Not implemented, but we return null to avoid problems with existing applications- Specified by:
getWarnings
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setCursorName
public void setCursorName(java.lang.String name) throws java.sql.SQLException
Not implemented.- Specified by:
setCursorName
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setEscapeProcessing
public void setEscapeProcessing(boolean enable) throws java.sql.SQLException
Not implemented.- Specified by:
setEscapeProcessing
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setFetchDirection
public void setFetchDirection(int direction) throws java.sql.SQLException
Not implemented.- Specified by:
setFetchDirection
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setFetchSize
public void setFetchSize(int rows) throws java.sql.SQLException
- Specified by:
setFetchSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setMaxFieldSize
public void setMaxFieldSize(int max) throws java.sql.SQLException
Not implemented.- Specified by:
setMaxFieldSize
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setMaxRows
public void setMaxRows(int max) throws java.sql.SQLException
Not implemented.- Specified by:
setMaxRows
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setQueryTimeout
public void setQueryTimeout(int seconds) throws java.sql.SQLException
Not implemented.- Specified by:
setQueryTimeout
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfacejava.sql.Statement
-
setCursorNameInternal
protected void setCursorNameInternal(java.lang.String cursorName)
-
isPoolable
public boolean isPoolable() throws java.sql.SQLException
- Specified by:
isPoolable
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setPoolable
public void setPoolable(boolean poolable) throws java.sql.SQLException
- Specified by:
setPoolable
in interfacejava.sql.Statement
- Throws:
java.sql.SQLException
-
setCatalog
public void setCatalog(java.lang.String catalog)
-
-