com.ibm.jtopenlite.database.jdbc
Class JDBCStatement

java.lang.Object
  extended by com.ibm.jtopenlite.database.jdbc.JDBCStatement
All Implemented Interfaces:
DatabaseSQLCommunicationsAreaCallback, Statement
Direct Known Subclasses:
JDBCPreparedStatement

public class JDBCStatement
extends Object
implements Statement, DatabaseSQLCommunicationsAreaCallback


Field Summary
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
           
 
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
JDBCStatement(JDBCConnection conn, String statementName, String cursorName, int rpbID)
           
 
Method Summary
 void addBatch(String sql)
          Not implemented.
 void cancel()
          Not implemented.
 void clearBatch()
          Not implemented.
 void clearWarnings()
          Warning are not supported.
 void close()
           
 boolean execute(String sql)
           
 boolean execute(String sql, int autoGeneratedKeys)
           
 boolean execute(String sql, int[] columnIndices)
          Not implemented.
 boolean execute(String sql, String[] columnNames)
          Not implemented.
 int[] executeBatch()
          Not implemented.
 ResultSet executeQuery(String sql)
           
 int executeUpdate(String sql)
           
 int executeUpdate(String sql, int autoGeneratedKeys)
           
 int executeUpdate(String sql, int[] columnIndices)
          Not implemented.
 int executeUpdate(String sql, String[] columnNames)
          Not implemented.
 Connection getConnection()
           
 int getFetchDirection()
           
 int getFetchSize()
           
 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 execute
 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(String sql)
           
 int getUpdateCount()
           
 SQLWarning getWarnings()
          Not implemented, but we return null to avoid problems with existing applications
 boolean isClosed()
           
 boolean isPoolable()
           
 void newSQLCommunicationsAreaData(int sqlCode, String sqlState, String generatedKey, int updateCount, int resultSetsCount)
           
 void setCatalog(String catalog)
           
 void setCursorName(String name)
          Not implemented.
protected  void setCursorNameInternal(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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,
                     String statementName,
                     String cursorName,
                     int rpbID)
              throws SQLException
Throws:
SQLException
Method Detail

getStatementType

public static int getStatementType(String sql)
                            throws SQLException
Throws:
SQLException

newSQLCommunicationsAreaData

public void newSQLCommunicationsAreaData(int sqlCode,
                                         String sqlState,
                                         String generatedKey,
                                         int updateCount,
                                         int resultSetsCount)
Specified by:
newSQLCommunicationsAreaData in interface DatabaseSQLCommunicationsAreaCallback

addBatch

public void addBatch(String sql)
              throws SQLException
Not implemented.

Specified by:
addBatch in interface Statement
Throws:
SQLException

cancel

public void cancel()
            throws SQLException
Not implemented.

Specified by:
cancel in interface Statement
Throws:
SQLException

clearBatch

public void clearBatch()
                throws SQLException
Not implemented.

Specified by:
clearBatch in interface Statement
Throws:
SQLException

clearWarnings

public void clearWarnings()
                   throws SQLException
Warning are not supported. This is a noop.

Specified by:
clearWarnings in interface Statement
Throws:
SQLException

close

public void close()
           throws SQLException
Specified by:
close in interface Statement
Throws:
SQLException

execute

public boolean execute(String sql)
                throws SQLException
Specified by:
execute in interface Statement
Throws:
SQLException

execute

public boolean execute(String sql,
                       int autoGeneratedKeys)
                throws SQLException
Specified by:
execute in interface Statement
Throws:
SQLException

execute

public boolean execute(String sql,
                       int[] columnIndices)
                throws SQLException
Not implemented.

Specified by:
execute in interface Statement
Throws:
SQLException

execute

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

Specified by:
execute in interface Statement
Throws:
SQLException

executeBatch

public int[] executeBatch()
                   throws SQLException
Not implemented.

Specified by:
executeBatch in interface Statement
Throws:
SQLException

executeQuery

public ResultSet executeQuery(String sql)
                       throws SQLException
Specified by:
executeQuery in interface Statement
Throws:
SQLException

executeUpdate

public int executeUpdate(String sql)
                  throws SQLException
Specified by:
executeUpdate in interface Statement
Throws:
SQLException

executeUpdate

public int executeUpdate(String sql,
                         int autoGeneratedKeys)
                  throws SQLException
Specified by:
executeUpdate in interface Statement
Throws:
SQLException

executeUpdate

public int executeUpdate(String sql,
                         int[] columnIndices)
                  throws SQLException
Not implemented.

Specified by:
executeUpdate in interface Statement
Throws:
SQLException

executeUpdate

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

Specified by:
executeUpdate in interface Statement
Throws:
SQLException

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface Statement
Throws:
SQLException

getFetchDirection

public int getFetchDirection()
                      throws SQLException
Specified by:
getFetchDirection in interface Statement
Throws:
SQLException

getFetchSize

public int getFetchSize()
                 throws SQLException
Specified by:
getFetchSize in interface Statement
Throws:
SQLException

getGeneratedKeys

public ResultSet getGeneratedKeys()
                           throws SQLException
Specified by:
getGeneratedKeys in interface Statement
Throws:
SQLException

getMaxFieldSize

public int getMaxFieldSize()
                    throws 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 interface Statement
Throws:
SQLException

getMaxRows

public int getMaxRows()
               throws SQLException
Retrieves the maximum number of rows that a ResultSet object produced by this Statement object can contain.

Specified by:
getMaxRows in interface Statement
Throws:
SQLException

getMoreResults

public boolean getMoreResults()
                       throws SQLException
Not implemented.

Specified by:
getMoreResults in interface Statement
Throws:
SQLException

getMoreResults

public boolean getMoreResults(int current)
                       throws SQLException
Not implemented.

Specified by:
getMoreResults in interface Statement
Throws:
SQLException

getQueryTimeout

public int getQueryTimeout()
                    throws SQLException
Retrieves the number of seconds the driver will wait for a Statement object to execute

Specified by:
getQueryTimeout in interface Statement
Throws:
SQLException

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Specified by:
getResultSet in interface Statement
Throws:
SQLException

getResultSetConcurrency

public int getResultSetConcurrency()
                            throws SQLException
Retrieves the result set concurrency for ResultSet objects generated by this Statement object.

Specified by:
getResultSetConcurrency in interface Statement
Throws:
SQLException

getResultSetHoldability

public int getResultSetHoldability()
                            throws SQLException
Retrieves the result set holdability for ResultSet objects generated by this Statement object. returns ResultSet.HOLD_CURSORS_OVER_COMMIT

Specified by:
getResultSetHoldability in interface Statement
Throws:
SQLException

getResultSetType

public int getResultSetType()
                     throws SQLException
Specified by:
getResultSetType in interface Statement
Throws:
SQLException

getUpdateCount

public int getUpdateCount()
                   throws SQLException
Specified by:
getUpdateCount in interface Statement
Throws:
SQLException

getWarnings

public SQLWarning getWarnings()
                       throws SQLException
Not implemented, but we return null to avoid problems with existing applications

Specified by:
getWarnings in interface Statement
Throws:
SQLException

setCursorName

public void setCursorName(String name)
                   throws SQLException
Not implemented.

Specified by:
setCursorName in interface Statement
Throws:
SQLException

setEscapeProcessing

public void setEscapeProcessing(boolean enable)
                         throws SQLException
Not implemented.

Specified by:
setEscapeProcessing in interface Statement
Throws:
SQLException

setFetchDirection

public void setFetchDirection(int direction)
                       throws SQLException
Not implemented.

Specified by:
setFetchDirection in interface Statement
Throws:
SQLException

setFetchSize

public void setFetchSize(int rows)
                  throws SQLException
Specified by:
setFetchSize in interface Statement
Throws:
SQLException

setMaxFieldSize

public void setMaxFieldSize(int max)
                     throws SQLException
Not implemented.

Specified by:
setMaxFieldSize in interface Statement
Throws:
SQLException

setMaxRows

public void setMaxRows(int max)
                throws SQLException
Not implemented.

Specified by:
setMaxRows in interface Statement
Throws:
SQLException

setQueryTimeout

public void setQueryTimeout(int seconds)
                     throws SQLException
Not implemented.

Specified by:
setQueryTimeout in interface Statement
Throws:
SQLException

isClosed

public boolean isClosed()

setCursorNameInternal

protected void setCursorNameInternal(String cursorName)

isPoolable

public boolean isPoolable()
                   throws SQLException
Throws:
SQLException

setPoolable

public void setPoolable(boolean poolable)
                 throws SQLException
Throws:
SQLException

setCatalog

public void setCatalog(String catalog)