| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttribble.sql.StatementAdapter
public class StatementAdapter
JDBC statement adapter class. Provides all the methods required by the java.sql.Statement class, most of which do nothing but throw an UnsupportedOperationException. Subclasses that extend this base class can then implement only the methods that they need.
        Copyright ©2008 by David R. Tribble, all rights reserved.
        Permission is granted to any person or entity except those designated by
        by the United States Department of State as a terrorist, or terrorist
        government or agency, to use and distribute this source code provided
        that the original copyright notice remains present and unaltered.
ResultSetAdapter| Field Summary | |
|---|---|
| static int | CLOSE_ALL_RESULTSConstant indicating that all ResultSet objects that have previously been kept open should be closed when calling getMoreResults(). | 
| static int | CLOSE_CURRENT_RESULTConstant indicating that the current ResultSet object should be closed when calling getMoreResults(). | 
| static int | EXECUTE_FAILEDConstant indicating that an error occured while executing a batch statement. | 
| static int | KEEP_CURRENT_RESULTConstant indicating that the current ResultSet object should not be closed when calling getMoreResults(). | 
| static int | NO_GENERATED_KEYSConstant indicating that generated keys should not be made available for retrieval. | 
| static int | RETURN_GENERATED_KEYSConstant indicating that generated keys should be made available for retrieval. | 
| (package private) static java.lang.String | REV | 
| static int | SUCCESS_NO_INFOConstant indicating that a batch statement executed successfully but that no count of the number of rows it affected is available. | 
| Constructor Summary | |
|---|---|
| StatementAdapter(java.sql.Connection conn)Constructor. | |
| Method Summary | |
|---|---|
|  void | addBatch(java.lang.String s) | 
|  void | cancel() | 
|  void | clearBatch() | 
|  void | clearWarnings() | 
|  void | close() | 
|  boolean | execute(java.lang.String stmt) | 
|  boolean | execute(java.lang.String stmt,
        int parm) | 
|  boolean | execute(java.lang.String stmt,
        int[] parms) | 
|  boolean | execute(java.lang.String stmt,
        java.lang.String[] parms) | 
|  int[] | executeBatch() | 
|  java.sql.ResultSet | executeQuery(java.lang.String stmt) | 
|  int | executeUpdate(java.lang.String stmt) | 
|  int | executeUpdate(java.lang.String stmt,
              int parm) | 
|  int | executeUpdate(java.lang.String stmt,
              int[] parms) | 
|  int | executeUpdate(java.lang.String stmt,
              java.lang.String[] parms) | 
|  java.sql.Connection | getConnection() | 
|  int | getFetchDirection() | 
|  int | getFetchSize() | 
|  java.sql.ResultSet | getGeneratedKeys() | 
|  int | getMaxFieldSize() | 
|  int | getMaxRows() | 
|  boolean | getMoreResults() | 
|  boolean | getMoreResults(int n) | 
|  int | getQueryTimeout() | 
|  java.sql.ResultSet | getResultSet() | 
|  int | getResultSetConcurrency() | 
|  int | getResultSetHoldability() | 
|  int | getResultSetType() | 
|  int | getUpdateCount() | 
|  java.sql.SQLWarning | getWarnings() | 
|  void | setCursorName(java.lang.String s) | 
|  void | setEscapeProcessing(boolean f) | 
|  void | setFetchDirection(int n) | 
|  void | setFetchSize(int n) | 
|  void | setMaxFieldSize(int n) | 
|  void | setMaxRows(int n) | 
|  void | setQueryTimeout(int n) | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
static final java.lang.String REV
public static final int CLOSE_ALL_RESULTS
getMoreResults().
public static final int CLOSE_CURRENT_RESULT
getMoreResults().
public static final int KEEP_CURRENT_RESULT
getMoreResults().
public static final int EXECUTE_FAILED
public static final int NO_GENERATED_KEYS
public static final int RETURN_GENERATED_KEYS
public static final int SUCCESS_NO_INFO
| Constructor Detail | 
|---|
public StatementAdapter(java.sql.Connection conn)
| Method Detail | 
|---|
public void close()
           throws java.sql.SQLException
close in interface java.sql.Statementjava.sql.SQLException
public java.sql.ResultSet executeQuery(java.lang.String stmt)
                                throws java.sql.SQLException
executeQuery in interface java.sql.Statementjava.sql.SQLException
public boolean execute(java.lang.String stmt)
                throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public boolean execute(java.lang.String stmt,
                       java.lang.String[] parms)
                throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public boolean execute(java.lang.String stmt,
                       int parm)
                throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public boolean execute(java.lang.String stmt,
                       int[] parms)
                throws java.sql.SQLException
execute in interface java.sql.Statementjava.sql.SQLException
public int executeUpdate(java.lang.String stmt)
                  throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public int executeUpdate(java.lang.String stmt,
                         java.lang.String[] parms)
                  throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public int executeUpdate(java.lang.String stmt,
                         int parm)
                  throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public int executeUpdate(java.lang.String stmt,
                         int[] parms)
                  throws java.sql.SQLException
executeUpdate in interface java.sql.Statementjava.sql.SQLException
public int[] executeBatch()
                   throws java.sql.SQLException
executeBatch in interface java.sql.Statementjava.sql.SQLException
public java.sql.ResultSet getResultSet()
                                throws java.sql.SQLException
getResultSet in interface java.sql.Statementjava.sql.SQLException
public boolean getMoreResults()
                       throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLException
public boolean getMoreResults(int n)
                       throws java.sql.SQLException
getMoreResults in interface java.sql.Statementjava.sql.SQLException
public int getResultSetType()
                     throws java.sql.SQLException
getResultSetType in interface java.sql.Statementjava.sql.SQLException
public int getResultSetHoldability()
                            throws java.sql.SQLException
getResultSetHoldability in interface java.sql.Statementjava.sql.SQLException
public int getResultSetConcurrency()
                            throws java.sql.SQLException
getResultSetConcurrency in interface java.sql.Statementjava.sql.SQLExceptionpublic java.sql.Connection getConnection()
getConnection in interface java.sql.Statement
public java.sql.SQLWarning getWarnings()
                                throws java.sql.SQLException
getWarnings in interface java.sql.Statementjava.sql.SQLException
public void clearWarnings()
                   throws java.sql.SQLException
clearWarnings in interface java.sql.Statementjava.sql.SQLException
public java.sql.ResultSet getGeneratedKeys()
                                    throws java.sql.SQLException
getGeneratedKeys in interface java.sql.Statementjava.sql.SQLException
public int getQueryTimeout()
                    throws java.sql.SQLException
getQueryTimeout in interface java.sql.Statementjava.sql.SQLException
public void setCursorName(java.lang.String s)
                   throws java.sql.SQLException
setCursorName in interface java.sql.Statementjava.sql.SQLException
public void addBatch(java.lang.String s)
              throws java.sql.SQLException
addBatch in interface java.sql.Statementjava.sql.SQLException
public void clearBatch()
                throws java.sql.SQLException
clearBatch in interface java.sql.Statementjava.sql.SQLException
public void setEscapeProcessing(boolean f)
                         throws java.sql.SQLException
setEscapeProcessing in interface java.sql.Statementjava.sql.SQLException
public int getMaxRows()
               throws java.sql.SQLException
getMaxRows in interface java.sql.Statementjava.sql.SQLException
public void setMaxRows(int n)
                throws java.sql.SQLException
setMaxRows in interface java.sql.Statementjava.sql.SQLException
public int getMaxFieldSize()
                    throws java.sql.SQLException
getMaxFieldSize in interface java.sql.Statementjava.sql.SQLException
public void setMaxFieldSize(int n)
                     throws java.sql.SQLException
setMaxFieldSize in interface java.sql.Statementjava.sql.SQLException
public int getFetchSize()
                 throws java.sql.SQLException
getFetchSize in interface java.sql.Statementjava.sql.SQLException
public void setFetchSize(int n)
                  throws java.sql.SQLException
setFetchSize in interface java.sql.Statementjava.sql.SQLException
public int getFetchDirection()
                      throws java.sql.SQLException
getFetchDirection in interface java.sql.Statementjava.sql.SQLException
public void setFetchDirection(int n)
                       throws java.sql.SQLException
setFetchDirection in interface java.sql.Statementjava.sql.SQLException
public void setQueryTimeout(int n)
                     throws java.sql.SQLException
setQueryTimeout in interface java.sql.Statementjava.sql.SQLException
public void cancel()
            throws java.sql.SQLException
cancel in interface java.sql.Statementjava.sql.SQLException
public int getUpdateCount()
                   throws java.sql.SQLException
getUpdateCount in interface java.sql.Statementjava.sql.SQLException| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||