Java Doc for EmbedStatement.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.impl.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.jdbc.ConnectionChild
      org.apache.derby.impl.jdbc.EmbedStatement

All known Subclasses:   org.apache.derby.impl.jdbc.EmbedStatement40,  org.apache.derby.impl.jdbc.EmbedPreparedStatement,
EmbedStatement
public class EmbedStatement extends ConnectionChild implements EngineStatement(Code)
EmbedStatement is a local JDBC statement.

Supports

  • JSR169 - no subsetting for java.sql.Statement
  • JDBC 2.0
  • JDBC 3.0 - no new dependencies on new JDBC 3.0 or JDK 1.4 classes, new methods can safely be added into implementation.

author:
   ames


Field Summary
 intMaxFieldSize
    
 StringSQLText
    
protected  EngineStatementapplicationStatement
     Statement reference the application is using to execute this Statement.
 VectorbatchStatements
    
protected  booleanisPoolable
    
final  LanguageConnectionContextlcc
    
 intmaxRows
    
final  intresultSetType
    
 java.sql.ResultSetresults
    
 intupdateCount
    

Constructor Summary
public  EmbedStatement(EmbedConnection connection, boolean forMetaData, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
    

Method Summary
public  voidaddBatch(String sql)
     JDBC 2.0 Adds a SQL command to the current batch of commmands for the statement.
final  voidaddWarning(SQLWarning sw)
     Add a SQLWarning to this Statement object.
public  voidcancel()
     Cancel can be used by one thread to cancel a statement that is being executed by another thread.
final  voidcheckExecStatus()
     A heavier weight version of checkStatus() that ensures the application's Connection object is still open.
final  voidcheckIfInMiddleOfBatch()
    
 voidcheckRequiresCallableStatement(Activation activation)
     Check to see if a statement requires to be executed via a callable statement.
final  voidcheckStatus()
     Throw an exception if this Statement has been closed explictly or it has noticed it has been closed implicitly.
final public  voidclearBatch()
     JDBC 2.0 Make the set of commands in the current batch empty.
 voidclearResultSets()
     Close and clear all result sets associated with this statement from the last execution.
public  voidclearWarnings()
     After this call getWarnings returns null until a new warning is reported for this Statement.
final public  voidclose()
     In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.

Note: A Statement is automatically closed when it is garbage collected.

 voidcloseActions()
    
public  booleanexecute(String sql)
     Execute a SQL statement that may return multiple results. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts.
public  booleanexecute(String sql, int autoGeneratedKeys)
     JDBC 3.0 Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval.
public  booleanexecute(String sql, int[] columnIndexes)
     JDBC 3.0 Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public  booleanexecute(String sql, String[] columnNames)
     JDBC 3.0 Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public  int[]executeBatch()
     JDBC 2.0 Submit a batch of commands to the database for execution. This method is optional. Moving jdbc2.0 batch related code in this class because callableStatement in jdbc 20 needs this code too and it doesn't derive from prepared statement in jdbc 20 in our implementation.
 booleanexecuteBatchElement(Object batchElement)
     Execute a single element of the batch.
public  java.sql.ResultSetexecuteQuery(String sql)
     Execute a SQL statement that returns a single ResultSet.
 booleanexecuteStatement(Activation a, boolean executeQuery, boolean executeUpdate)
     Execute the current statement.
public  intexecuteUpdate(String sql)
     Execute a SQL INSERT, UPDATE or DELETE statement.
public  intexecuteUpdate(String sql, int autoGeneratedKeys)
     JDBC 3.0 Execute the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
public  intexecuteUpdate(String sql, int[] columnIndexes)
     JDBC 3.0 Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
public  intexecuteUpdate(String sql, String[] columnNames)
     JDBC 3.0 Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval.
final public  java.sql.ConnectiongetConnection()
     JDBC 2.0 Return the Connection that produced the Statement.
public  intgetFetchDirection()
     JDBC 2.0 Determine the fetch direction.
public  intgetFetchSize()
     JDBC 2.0 Determine the default fetch size.
final public  java.sql.ResultSetgetGeneratedKeys()
     JDBC 3.0 Retrieves any auto-generated keys created as a result of executing this Statement object.
public  intgetMaxFieldSize()
     The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns.
public  intgetMaxRows()
     The maxRows limit is the maximum number of rows that a ResultSet can contain.
final public  booleangetMoreResults()
     getMoreResults moves to a Statement's next result.
final public  booleangetMoreResults(int current)
    
public  ParameterValueSetgetParameterValueSet()
    
final public  intgetQueryTimeout()
     The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
final public  java.sql.ResultSetgetResultSet()
     getResultSet returns the current result as a ResultSet.
public  intgetResultSetConcurrency()
     JDBC 2.0 Determine the result set concurrency.
final public  intgetResultSetHoldability()
     JDBC 3.0 Retrieves the result set holdability for ResultSet objects generated by this Statement object.
final public  intgetResultSetType()
     JDBC 2.0 Determine the result set type.
public  StringgetSQLText()
    
final public  intgetUpdateCount()
     getUpdateCount returns the current result as an update count; if the result is a ResultSet or there are no more results -1 is returned.
public  SQLWarninggetWarnings()
     The first warning reported by calls on this Statement is returned.
public  booleanisClosed()
     Tell whether this statment has been closed or not.
public  booleanisPoolable()
     Returns the value of the EmbedStatement's poolable hint, indicating whether pooling is requested.
 voidresultSetClosing(EmbedResultSet closingLRS)
     Callback on the statement when one of its result sets is closed.
final public  voidsetApplicationStatement(EngineStatement s)
     Set the application statement for this Statement.
public  voidsetCursorName(String name)
     setCursorName defines the SQL cursor name that will be used by subsequent Statement execute methods.
public  voidsetEscapeProcessing(boolean enable)
     If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.
public  voidsetFetchDirection(int direction)
     JDBC 2.0 Give a hint as to the direction in which the rows in a result set will be processed.
public  voidsetFetchSize(int rows)
     JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed.
public  voidsetMaxFieldSize(int max)
     The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields.
public  voidsetMaxRows(int max)
     The maxRows limit is set to limit the number of rows that any ResultSet can contain.
public  voidsetPoolable(boolean poolable)
     Requests that an EmbedStatement be pooled or not.
final public  voidsetQueryTimeout(int seconds)
     The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute.
public  voidtransferBatch(EmbedStatement other)
     Transfer my batch of Statements to a newly created Statement.

Field Detail
MaxFieldSize
int MaxFieldSize(Code)



SQLText
String SQLText(Code)



applicationStatement
protected EngineStatement applicationStatement(Code)
Statement reference the application is using to execute this Statement. Normally set to this, but if this was created by a Connection from an XAConnection then this will be a reference to the BrokeredStatement. Making it protected to allow access from EmbedPreparedStatement40 to be used for StatementEvents



batchStatements
Vector batchStatements(Code)



isPoolable
protected boolean isPoolable(Code)



lcc
final LanguageConnectionContext lcc(Code)



maxRows
int maxRows(Code)



resultSetType
final int resultSetType(Code)



results
java.sql.ResultSet results(Code)



updateCount
int updateCount(Code)




Constructor Detail
EmbedStatement
public EmbedStatement(EmbedConnection connection, boolean forMetaData, int resultSetType, int resultSetConcurrency, int resultSetHoldability)(Code)




Method Detail
addBatch
public void addBatch(String sql) throws SQLException(Code)
JDBC 2.0 Adds a SQL command to the current batch of commmands for the statement. This method is optional.
Parameters:
  sql - typically this is a static SQL INSERT or UPDATE statement
exception:
  SQLException - if a database-access error occurs, or thedriver does not support batch statements



addWarning
final void addWarning(SQLWarning sw)(Code)
Add a SQLWarning to this Statement object. If the Statement already has a SQLWarning then it is added to the end of the chain.
See Also:   EmbedStatement.getWarnings()



cancel
public void cancel() throws SQLException(Code)
Cancel can be used by one thread to cancel a statement that is being executed by another thread.
exception:
  SQLException - thrown on failure.



checkExecStatus
final void checkExecStatus() throws SQLException(Code)
A heavier weight version of checkStatus() that ensures the application's Connection object is still open. This is to stop errors or unexpected behaviour when a [Prepared]Statement object is used after the application has been closed. In particular to ensure that a Statement obtained from a PooledConnection cannot be used after the application has closed its connection (as the underlying Connection is still active). To avoid this heavier weight check on every method of [Prepared]Statement it is only used on those methods that would end up using the database's connection to read or modify data. E.g. execute*(), but not setXXX, etc.
If this Statement's Connection is closed an exception will be thrown and the active field will be set to false, completely marking the Statement as closed.
If the Statement is not currently connected to an active transaction, i.e. a suspended global transaction, then this method will throw a SQLException but the Statement will remain open. The Statement is open but unable to process any new requests until its global transaction is resumed.
Upon return from the method, with or without a SQLException the field active will correctly represent the open state of the Statement.
exception:
  SQLException - Thrown if the statement is marked as closedor the Statement's transaction is suspended.
See Also:   EmbedStatement.checkStatus()



checkIfInMiddleOfBatch
final void checkIfInMiddleOfBatch() throws SQLException(Code)



checkRequiresCallableStatement
void checkRequiresCallableStatement(Activation activation) throws SQLException(Code)
Check to see if a statement requires to be executed via a callable statement.



checkStatus
final void checkStatus() throws SQLException(Code)
Throw an exception if this Statement has been closed explictly or it has noticed it has been closed implicitly. JDBC specifications require nearly all methods throw a SQLException if the Statement has been closed, thus most methods call this method or checkExecStatus first.
exception:
  SQLException - Thrown if the statement is marked as closed.
See Also:   EmbedStatement.checkExecStatus()



clearBatch
final public void clearBatch() throws SQLException(Code)
JDBC 2.0 Make the set of commands in the current batch empty. This method is optional.
exception:
  SQLException - if a database-access error occurs, or thedriver does not support batch statements



clearResultSets
void clearResultSets() throws SQLException(Code)
Close and clear all result sets associated with this statement from the last execution.



clearWarnings
public void clearWarnings() throws SQLException(Code)
After this call getWarnings returns null until a new warning is reported for this Statement.
exception:
  SQLException - thrown on failure.



close
final public void close() throws SQLException(Code)
In many cases, it is desirable to immediately release a Statements's database and JDBC resources instead of waiting for this to happen when it is automatically closed; the close method provides this immediate release.

Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed its current ResultSet, if one exists, is also closed.
exception:
  SQLException - thrown on failure.




closeActions
void closeActions() throws SQLException(Code)



execute
public boolean execute(String sql) throws SQLException(Code)
Execute a SQL statement that may return multiple results. Under some (uncommon) situations a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this, unless you're executing a stored procedure that you know may return multiple results, or unless you're dynamically executing an unknown SQL string. The "execute", "getMoreResults", "getResultSet" and "getUpdateCount" methods let you navigate through multiple results. The "execute" method executes a SQL statement and indicates the form of the first result. You can then use getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
  sql - any SQL statement true if the first result is a ResultSet; false if it is an integer
See Also:   EmbedStatement.getResultSet
See Also:   EmbedStatement.getUpdateCount
See Also:   EmbedStatement.getMoreResults
exception:
  SQLException - thrown on failure



execute
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code)
JDBC 3.0 Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. The driver will ignore this signal if the SQL statement is not an INSERT statement.
Parameters:
  sql - any SQL statement
Parameters:
  autoGeneratedKeys - - a constant indicating whetherauto-generated keys should be made available for retrieval usingthe method getGeneratedKeys; one of the following constants:Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS rue if the first result is a ResultSet object; false ifit is an update count or there are no results
exception:
  SQLException - if a database access error occurs



execute
public boolean execute(String sql, int[] columnIndexes) throws SQLException(Code)
JDBC 3.0 Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement.
Parameters:
  sql - any SQL statement
Parameters:
  columnIndexes - - an array of the indexes of the columns in theinserted row that should be made available for retrieval by a call tothe method getGeneratedKeys rue if the first result is a ResultSet object; false ifit is an update count or there are no results
exception:
  SQLException - if a database access error occurs



execute
public boolean execute(String sql, String[] columnNames) throws SQLException(Code)
JDBC 3.0 Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement.
Parameters:
  sql - any SQL statement
Parameters:
  columnNames - - an array of the names of the columns in theinserted row that should be made available for retrieval by a call tothe method getGeneratedKeys rue if the first result is a ResultSet object; false ifit is an update count or there are no results
exception:
  SQLException - if a database access error occurs



executeBatch
public int[] executeBatch() throws SQLException(Code)
JDBC 2.0 Submit a batch of commands to the database for execution. This method is optional. Moving jdbc2.0 batch related code in this class because callableStatement in jdbc 20 needs this code too and it doesn't derive from prepared statement in jdbc 20 in our implementation. BatchUpdateException is the only new class from jdbc 20 which is being referenced here and in order to avoid any jdk11x problems, using reflection code to make an instance of that class. an array of update counts containing one element for eachcommand in the batch. The array is ordered accordingto the order in which commands were inserted into the batch
exception:
  SQLException - if a database-access error occurs, or thedriver does not support batch statements



executeBatchElement
boolean executeBatchElement(Object batchElement) throws SQLException, StandardException(Code)
Execute a single element of the batch. Overridden by EmbedPreparedStatement



executeQuery
public java.sql.ResultSet executeQuery(String sql) throws SQLException(Code)
Execute a SQL statement that returns a single ResultSet.
Parameters:
  sql - typically this is a static SQL SELECT statement a ResultSet that contains the data produced by thequery; never null
exception:
  SQLException - thrown on failure.



executeStatement
boolean executeStatement(Activation a, boolean executeQuery, boolean executeUpdate) throws SQLException(Code)
Execute the current statement.
exception:
  SQLException - thrown on failure.



executeUpdate
public int executeUpdate(String sql) throws SQLException(Code)
Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.
Parameters:
  sql - a SQL INSERT, UPDATE or DELETE statement or a SQLstatement that returns nothing either the row count for INSERT, UPDATE or DELETE; or 0for SQL statements that return nothing
exception:
  SQLException - thrown on failure.



executeUpdate
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code)
JDBC 3.0 Execute the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.
Parameters:
  sql - a SQL INSERT, UPDATE or DELETE statement or a SQLstatement that returns nothing
Parameters:
  autoGeneratedKeys - - a flag indicating whether auto-generated keysshould be made available for retrieval; one of the following constants:Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS either the row count for INSERT, UPDATE or DELETE; or 0for SQL statements that return nothing
exception:
  SQLException - if a database access error occurs



executeUpdate
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException(Code)
JDBC 3.0 Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT statement
Parameters:
  sql - a SQL INSERT, UPDATE or DELETE statement or a SQLstatement that returns nothing
Parameters:
  columnIndexes - - an array of column indexes indicating thecolumns that should be returned from the inserted row either the row count for INSERT, UPDATE or DELETE; or 0for SQL statements that return nothing
exception:
  SQLException - if a database access error occurs



executeUpdate
public int executeUpdate(String sql, String[] columnNames) throws SQLException(Code)
JDBC 3.0 Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT statement
Parameters:
  sql - a SQL INSERT, UPDATE or DELETE statement or a SQLstatement that returns nothing
Parameters:
  columnNames - - an array of the names of the columnsthat should be returned from the inserted row either the row count for INSERT, UPDATE or DELETE; or 0for SQL statements that return nothing
exception:
  SQLException - if a database access error occurs



getConnection
final public java.sql.Connection getConnection() throws SQLException(Code)
JDBC 2.0 Return the Connection that produced the Statement.
exception:
  SQLException - Exception if it cannot find the connectionassociated to this statement.



getFetchDirection
public int getFetchDirection() throws SQLException(Code)
JDBC 2.0 Determine the fetch direction. the default fetch direction
exception:
  SQLException - if a database-access error occurs



getFetchSize
public int getFetchSize() throws SQLException(Code)
JDBC 2.0 Determine the default fetch size.
exception:
  SQLException - if a database-access error occurs



getGeneratedKeys
final public java.sql.ResultSet getGeneratedKeys() throws SQLException(Code)
JDBC 3.0 Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement is a non-insert statement, a null ResultSet object is returned. a ResultSet object containing the auto-generated key(s) generated bythe execution of this Statement object
exception:
  SQLException - if a database access error occurs



getMaxFieldSize
public int getMaxFieldSize() throws SQLException(Code)
The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded. the current max column size limit; zero means unlimited
exception:
  SQLException - thrown on failure.



getMaxRows
public int getMaxRows() throws SQLException(Code)
The maxRows limit is the maximum number of rows that a ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped. the current max row limit; zero means unlimited
exception:
  SQLException - thrown on failure.



getMoreResults
final public boolean getMoreResults() throws SQLException(Code)
getMoreResults moves to a Statement's next result. It returns true if this result is a ResultSet. getMoreResults also implicitly closes any current ResultSet obtained with getResultSet. There are no more results when (!getMoreResults() && (getUpdateCount() == -1) true if the next result is a ResultSet; false if it isan update count or there are no more results
See Also:   EmbedStatement.execute
exception:
  SQLException - thrown on failure.



getMoreResults
final public boolean getMoreResults(int current) throws SQLException(Code)
JDBC 3.0 Moves to this Statement obect's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object
Parameters:
  current - - one of the following Statement constants indicating whatshould happen to current ResultSet objects obtained using the methodgetResultSetCLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, or CLOSE_ALL_RESULTS true if the next result is a ResultSet; false if it isan update count or there are no more results
See Also:   EmbedStatement.execute
exception:
  SQLException - thrown on failure.



getParameterValueSet
public ParameterValueSet getParameterValueSet()(Code)



getQueryTimeout
final public int getQueryTimeout() throws SQLException(Code)
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown. the current query timeout limit in seconds; zero means unlimited
exception:
  SQLException - thrown on failure.



getResultSet
final public java.sql.ResultSet getResultSet() throws SQLException(Code)
getResultSet returns the current result as a ResultSet. It should only be called once per result. the current result as a ResultSet; null if the resultis an update count or there are no more results or the statementwas closed.
See Also:   EmbedStatement.execute



getResultSetConcurrency
public int getResultSetConcurrency() throws SQLException(Code)
JDBC 2.0 Determine the result set concurrency.
exception:
  SQLException - Feature not implemented for now.



getResultSetHoldability
final public int getResultSetHoldability() throws SQLException(Code)
JDBC 3.0 Retrieves the result set holdability for ResultSet objects generated by this Statement object. either ResultSet.HOLD_CURSORS_OVER_COMMIT orResultSet.CLOSE_CURSORS_AT_COMMIT
exception:
  SQLException - Feature not implemented for now.



getResultSetType
final public int getResultSetType() throws SQLException(Code)
JDBC 2.0 Determine the result set type.
exception:
  SQLException - Feature not implemented for now.



getSQLText
public String getSQLText()(Code)



getUpdateCount
final public int getUpdateCount() throws SQLException(Code)
getUpdateCount returns the current result as an update count; if the result is a ResultSet or there are no more results -1 is returned. It should only be called once per result.

The only way to tell for sure that the result is an update count is to first test to see if it is a ResultSet. If it is not a ResultSet it is either an update count or there are no more results. the current result as an update count; -1 if it is aResultSet or there are no more results
See Also:   EmbedStatement.execute




getWarnings
public SQLWarning getWarnings() throws SQLException(Code)
The first warning reported by calls on this Statement is returned. A Statment's execute methods clear its SQLWarning chain. Subsequent Statement warnings will be chained to this SQLWarning.

The warning chain is automatically cleared each time a statement is (re)executed.

Note: If you are processing a ResultSet then any warnings associated with ResultSet reads will be chained on the ResultSet object. the first SQLWarning or null
exception:
  SQLException - thrown on failure.




isClosed
public boolean isClosed() throws SQLException(Code)
Tell whether this statment has been closed or not. true is closed, false otherwise.
exception:
  SQLException - if a database access error occurs.



isPoolable
public boolean isPoolable() throws SQLException(Code)
Returns the value of the EmbedStatement's poolable hint, indicating whether pooling is requested. The value of the poolable hint.
throws:
  SQLException - if the Statement has been closed.



resultSetClosing
void resultSetClosing(EmbedResultSet closingLRS) throws SQLException(Code)
Callback on the statement when one of its result sets is closed. This allows the statement to control when it completes and hence when it commits in auto commit mode. Must have connection synchronization and setupContextStack(), this is required for the call to commitIfNeeded().



setApplicationStatement
final public void setApplicationStatement(EngineStatement s)(Code)
Set the application statement for this Statement.



setCursorName
public void setCursorName(String name) throws SQLException(Code)
setCursorName defines the SQL cursor name that will be used by subsequent Statement execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If the database doesn't support positioned update/delete, this method is a noop.

Note: By definition, positioned update/delete execution must be done by a different Statement than the one which generated the ResultSet being used for positioning. Also, cursor names must be unique within a Connection.
Parameters:
  name - the new cursor name.




setEscapeProcessing
public void setEscapeProcessing(boolean enable) throws SQLException(Code)
If escape scanning is on (the default) the driver will do escape substitution before sending the SQL to the database.
Parameters:
  enable - true to enable; false to disable
exception:
  SQLException - thrown on failure.



setFetchDirection
public void setFetchDirection(int direction) throws SQLException(Code)
JDBC 2.0 Give a hint as to the direction in which the rows in a result set will be processed. The hint applies only to result sets created using this Statement object. The default value is ResultSet.FETCH_FORWARD.
Parameters:
  direction - the initial direction for processing rows
exception:
  SQLException - if a database-access error occurs or directionis not one of ResultSet.FETCH_FORWARD, ResultSet.FETCH_REVERSE, orResultSet.FETCH_UNKNOWN



setFetchSize
public void setFetchSize(int rows) throws SQLException(Code)
JDBC 2.0 Give the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed. The number of rows specified only affects result sets created using this statement. If the value specified is zero, then the hint is ignored. The default value is zero.
Parameters:
  rows - the number of rows to fetch
exception:
  SQLException - if a database-access error occurs, or thecondition 0 <= rows <= this.getMaxRows() is not satisfied.



setMaxFieldSize
public void setMaxFieldSize(int max) throws SQLException(Code)
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. If the limit is exceeded, the excess data is silently discarded.
Parameters:
  max - the new max column size limit; zero means unlimited
exception:
  SQLException - thrown on failure.



setMaxRows
public void setMaxRows(int max) throws SQLException(Code)
The maxRows limit is set to limit the number of rows that any ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.
Parameters:
  max - the new max rows limit; zero means unlimited
exception:
  SQLException - thrown on failure.



setPoolable
public void setPoolable(boolean poolable) throws SQLException(Code)
Requests that an EmbedStatement be pooled or not.
Parameters:
  poolable - requests that the EmbedStatement be pooled if trueand not be pooled if false.
throws:
  SQLException - if the EmbedStatement has been closed.



setQueryTimeout
final public void setQueryTimeout(int seconds) throws SQLException(Code)
The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded a SQLException is thrown.
Parameters:
  seconds - the new query timeout limit in seconds; zero means unlimited
exception:
  SQLException - thrown on failure.



transferBatch
public void transferBatch(EmbedStatement other) throws SQLException(Code)
Transfer my batch of Statements to a newly created Statement.



Fields inherited from org.apache.derby.impl.jdbc.ConnectionChild
final InternalDriver factory(Code)(Java Doc)
EmbedConnection localConn(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.jdbc.ConnectionChild
final void commitIfAutoCommit() throws SQLException(Code)(Java Doc)
final void commitIfNeeded() throws SQLException(Code)(Java Doc)
java.util.Calendar getCal()(Code)(Java Doc)
final Object getConnectionSynchronization()(Code)(Java Doc)
final EmbedConnection getEmbedConnection()(Code)(Java Doc)
final SQLException handleException(Throwable t) throws SQLException(Code)(Java Doc)
final void needCommit()(Code)(Java Doc)
SQLException newSQLException(String messageId)(Code)(Java Doc)
SQLException newSQLException(String messageId, Object arg1)(Code)(Java Doc)
SQLException newSQLException(String messageId, Object arg1, Object arg2)(Code)(Java Doc)
final void restoreContextStack() throws SQLException(Code)(Java Doc)
final void setupContextStack() throws SQLException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.