jxDBCon 0.9z

org.sourceforge.jxdbcon
Class AbstractStatement

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.AbstractStatement
All Implemented Interfaces:
Statement
Direct Known Subclasses:
AbstractPreparedStatement, PGStatement

public abstract class AbstractStatement
extends Object
implements Statement

AbstractStatement implements Statement definining some useful functions.

Version:
$Revision: 1.14 $, $Date: 2002/04/11 17:58:09 $
Author:
Keve Müller

Field Summary
protected  List batch
           
protected  AbstractConnection conn
           
protected  String cursorName
           
protected  boolean escapeProcessing
           
protected  int fetchDirection
           
protected  int fetchSize
           
protected  int maxFieldSize
           
protected  int maxRows
           
protected  int queryTimeout
           
private  int resultSetConcurrency
           
private  int resultSetHoldability
           
private  int resultSetType
           
protected  SQLWarning warnings
          The warnings.
 
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
protected AbstractStatement(AbstractConnection conn, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
           
 
Method Summary
 void addBatch(String sql)
           
 void cancel()
           
 void clearBatch()
           
 void clearWarnings()
           
 void close()
           
 boolean execute(String sql, int autoGeneratedKeys)
          autoGeneratedKeys parameter is ignored.
 boolean execute(String sql, int[] columnindexes)
          columnindexes parameter is ignored.
 boolean execute(String sql, String[] columnnames)
          columnNames parameter is ignored.
 int[] executeBatch()
          Not supported.
 ResultSet executeQuery(String sql)
           
 int executeUpdate(String sql)
           
 int executeUpdate(String sql, int autoGeneratedKeys)
           
 int executeUpdate(String sql, int[] columnIndexes)
           
 int executeUpdate(String sql, String[] columnNames)
           
 void finalize()
           
 Connection getConnection()
           
 String getCursorName()
           
 int getFetchDirection()
           
 int getFetchSize()
           
 ResultSet getGeneratedKeys()
          Not supported.
 int getMaxFieldSize()
           
 int getMaxRows()
           
 boolean getMoreResults()
           
 boolean getMoreResults(int current)
           
 int getQueryTimeout()
           
abstract  ResultSet getResultSet()
           
 int getResultSetConcurrency()
           
 int getResultSetHoldability()
           
 int getResultSetType()
           
abstract  int getUpdateCount()
           
 SQLWarning getWarnings()
           
protected  boolean isClosed()
           
 void setCursorName(String cursorName)
           
 void setEscapeProcessing(boolean enable)
           
 void setFetchDirection(int direction)
           
 void setFetchSize(int rows)
           
 void setMaxFieldSize(int max)
           
 void setMaxRows(int max)
           
 void setQueryTimeout(int seconds)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Statement
execute
 

Field Detail

batch

protected List batch

conn

protected AbstractConnection conn

cursorName

protected String cursorName

escapeProcessing

protected boolean escapeProcessing

fetchDirection

protected int fetchDirection

fetchSize

protected int fetchSize

maxFieldSize

protected int maxFieldSize

maxRows

protected int maxRows

queryTimeout

protected int queryTimeout

resultSetConcurrency

private final int resultSetConcurrency

resultSetHoldability

private final int resultSetHoldability

resultSetType

private final int resultSetType

warnings

protected SQLWarning warnings
The warnings.

Constructor Detail

AbstractStatement

protected AbstractStatement(AbstractConnection conn,
                            int resultSetType,
                            int resultSetConcurrency,
                            int resultSetHoldability)
Method Detail

addBatch

public final void addBatch(String sql)
                    throws SQLException
Specified by:
addBatch in interface Statement
SQLException

cancel

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

clearBatch

public final void clearBatch()
                      throws SQLException
Specified by:
clearBatch in interface Statement
SQLException

clearWarnings

public final void clearWarnings()
Specified by:
clearWarnings in interface Statement

close

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

execute

public boolean execute(String sql,
                       int autoGeneratedKeys)
                throws SQLException
autoGeneratedKeys parameter is ignored.

Specified by:
execute in interface Statement
SQLException

execute

public boolean execute(String sql,
                       int[] columnindexes)
                throws SQLException
columnindexes parameter is ignored.

Specified by:
execute in interface Statement
SQLException

execute

public boolean execute(String sql,
                       String[] columnnames)
                throws SQLException
columnNames parameter is ignored.

Specified by:
execute in interface Statement
SQLException

executeBatch

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

Specified by:
executeBatch in interface Statement
SQLException

executeQuery

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

executeUpdate

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

executeUpdate

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

executeUpdate

public final int executeUpdate(String sql,
                               int[] columnIndexes)
                        throws SQLException
Specified by:
executeUpdate in interface Statement
SQLException

executeUpdate

public final int executeUpdate(String sql,
                               String[] columnNames)
                        throws SQLException
Specified by:
executeUpdate in interface Statement
SQLException

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throwable

getConnection

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

getCursorName

public final String getCursorName()

getFetchDirection

public final int getFetchDirection()
Specified by:
getFetchDirection in interface Statement

getFetchSize

public final int getFetchSize()
Specified by:
getFetchSize in interface Statement

getGeneratedKeys

public ResultSet getGeneratedKeys()
                           throws SQLException
Not supported.

Specified by:
getGeneratedKeys in interface Statement
SQLException

getMaxFieldSize

public final int getMaxFieldSize()
                          throws SQLException
Specified by:
getMaxFieldSize in interface Statement
SQLException

getMaxRows

public final int getMaxRows()
                     throws SQLException
Specified by:
getMaxRows in interface Statement
SQLException

getMoreResults

public boolean getMoreResults()
                       throws SQLException
Specified by:
getMoreResults in interface Statement
SQLException

getMoreResults

public boolean getMoreResults(int current)
                       throws SQLException
Specified by:
getMoreResults in interface Statement
SQLException

getQueryTimeout

public final int getQueryTimeout()
                          throws SQLException
Specified by:
getQueryTimeout in interface Statement
SQLException

getResultSet

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

getResultSetConcurrency

public final int getResultSetConcurrency()
Specified by:
getResultSetConcurrency in interface Statement

getResultSetHoldability

public final int getResultSetHoldability()
Specified by:
getResultSetHoldability in interface Statement

getResultSetType

public final int getResultSetType()
Specified by:
getResultSetType in interface Statement

getUpdateCount

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

getWarnings

public final SQLWarning getWarnings()
Specified by:
getWarnings in interface Statement

isClosed

protected boolean isClosed()

setCursorName

public final void setCursorName(String cursorName)
                         throws SQLException
Specified by:
setCursorName in interface Statement
SQLException

setEscapeProcessing

public final void setEscapeProcessing(boolean enable)
                               throws SQLException
Specified by:
setEscapeProcessing in interface Statement
SQLException

setFetchDirection

public final void setFetchDirection(int direction)
                             throws SQLException
Specified by:
setFetchDirection in interface Statement
SQLException

setFetchSize

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

setMaxFieldSize

public final void setMaxFieldSize(int max)
                           throws SQLException
Specified by:
setMaxFieldSize in interface Statement
SQLException

setMaxRows

public final void setMaxRows(int max)
                      throws SQLException
Specified by:
setMaxRows in interface Statement
SQLException

setQueryTimeout

public final void setQueryTimeout(int seconds)
                           throws SQLException
Specified by:
setQueryTimeout in interface Statement
SQLException

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.