Java Doc for Statement.java in  » Database-DBMS » Quadcap-Embeddable-Database » com » quadcap » 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 » Quadcap Embeddable Database » com.quadcap.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.quadcap.jdbc.Statement

All known Subclasses:   com.quadcap.jdbc.PreparedStatement,
Statement
public class Statement implements java.sql.Statement(Code)
This class implements the java.sql.Statement interface, which provides facilities for executing SQL statements on a database connection, as part of that connection's transaction. TODO: setMaxFieldSize TODO: setQueryTimeout TODO: JDBC3.0: return generated keys
author:
   Stan Bailes


Field Summary
 Connectionconn
    
protected  booleanescapeProcessing
    
 intmaxRows
    
 com.quadcap.sql.ConnectionqConn
    
 intresultSetConcurrency
    
 intresultSetType
    
 ResultSetrs
    
 Sessionsession
    
final static  ConfigNumbertrace
    
 intupdateCount
    

Constructor Summary
public  Statement(Connection conn)
    
public  Statement(Connection conn, int resultSetType, int resultSetConcurrency)
     Create a new Statement with the specified result set type and concurrency.

Method Summary
public  voidaddBatch(String sql)
     This QED release doesn't support batch statement execution.
public  voidcancel()
     QED does not support the cancel() feature.
public  voidclearBatch()
     This QED release doesn't support batch statement execution.
public  voidclearWarnings()
     Clear any warnings associated with this Statement object.
public  voidclose()
     Close this statement object and free up any resources held by it.
public  booleanexecute(String sql)
     Execute the specified SQL statement, returning true if the statement generates a ResultSet object.
public  booleanexecute(String sql, int autoGeneratedKeys)
     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)
     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)
     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()
     This QED release doesn't support batch statement execution.
public  java.sql.ResultSetexecuteQuery(String sql)
     Execute the specified SQL query statement, returning the ResultSet object containing the results of the query.
public  intexecuteUpdate(String sql)
     Execute the specified SQL update statement, returning the update count, meaning the number of rows updated or inserted by this statement.
public  intexecuteUpdate(String sql, int autoGeneratedKeys)
     Executes 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)
     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)
     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  voidfinalize()
    
public  java.sql.ConnectiongetConnection()
     Return the Connection object used to create this Statement object.
public  intgetFetchDirection()
    
public  intgetFetchSize()
     In QED, the fetch size is always 1.
public  java.sql.ResultSetgetGeneratedKeys()
     Retrieves any auto-generated keys created as a result of executing this Statement object.
public  intgetMaxFieldSize()
     QED imposes no maximum field size.
public  intgetMaxRows()
     QED imposes no limit on the number of rows in a ResultSet.
public  booleangetMoreResults()
     QED only returns one ResultSet per statement, so this function always returns false (after closing the current ResultSet object for this Statement.
public  booleangetMoreResults(int current)
     Moves to this Statement object'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.
public  intgetQueryTimeout()
     QED doesn't support query timeouts, so this method always returns zero.
public  java.sql.ResultSetgetResultSet()
     Return the ResultSet generated by the last call to execute(), unless that ResultSet has been closed, or if there was no ResultSet generated by the last call to execute(), in which case, return null.
public  intgetResultSetConcurrency()
     Return the default result set concurrency for ResultSet objects generated by this Statement object.
public  intgetResultSetHoldability()
     Retrieves the result set holdability for ResultSet objects generated by this Statement object.
public  intgetResultSetType()
     Return the default result set type for ResultSet objects generated by this Statement object.
public  intgetUpdateCount()
     Return the update count for the last statement executed.
public  SQLWarninggetWarnings()
     Since this QED release doesn't generate SQLWarnings, this function always returns null.
public  voidsetCursorName(String name)
    
public  voidsetEscapeProcessing(boolean enable)
     Enable or disable JDBC escape processing mode.
public  voidsetFetchDirection(int dir)
     Set the default fetch direction for ResultSet objects generated by this Statement object.
public  voidsetFetchSize(int x)
     QED, being an embedded driver, fetches rows only when they are needed, with no performance penalty.
public  voidsetMaxFieldSize(int x)
    
public  voidsetMaxRows(int x)
    
public  voidsetQueryTimeout(int x)
    
public  StringtoString()
    

Field Detail
conn
Connection conn(Code)



escapeProcessing
protected boolean escapeProcessing(Code)



maxRows
int maxRows(Code)



qConn
com.quadcap.sql.Connection qConn(Code)



resultSetConcurrency
int resultSetConcurrency(Code)



resultSetType
int resultSetType(Code)



rs
ResultSet rs(Code)



session
Session session(Code)



trace
final static ConfigNumber trace(Code)



updateCount
int updateCount(Code)




Constructor Detail
Statement
public Statement(Connection conn) throws SQLException, IOException(Code)
Create a new statement



Statement
public Statement(Connection conn, int resultSetType, int resultSetConcurrency) throws SQLException, IOException(Code)
Create a new Statement with the specified result set type and concurrency.




Method Detail
addBatch
public void addBatch(String sql) throws SQLException(Code)
This QED release doesn't support batch statement execution.
exception:
  SQLException - "not implemented"



cancel
public void cancel() throws SQLException(Code)
QED does not support the cancel() feature.



clearBatch
public void clearBatch() throws SQLException(Code)
This QED release doesn't support batch statement execution.
exception:
  SQLException - "not implemented"



clearWarnings
public void clearWarnings()(Code)
Clear any warnings associated with this Statement object. Since this QED release doesn't generate SQLWarnings, this function does nothing.



close
public void close()(Code)
Close this statement object and free up any resources held by it.



execute
public boolean execute(String sql) throws SQLException(Code)
Execute the specified SQL statement, returning true if the statement generates a ResultSet object.
Parameters:
  sql - an SQL statement true if execution of the statement results in the creationof a ResultSet
See Also:   Statement.getResultSet()
exception:
  SQLException - may be thrown



execute
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code)
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.

In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
  sql - any SQL statement
Parameters:
  autoGeneratedKeys - a constant indicating whether auto-generated keys should be made available for retrieval using the methodgetGeneratedKeys; one of the following constants:Statement.RETURN_GENERATED_KEYS orStatement.NO_GENERATED_KEYS true if the first result is a ResultSetobject; false if it is an update count or there areno results
exception:
  SQLException - if a database access error occurs
See Also:   Statement.getResultSet
See Also:   Statement.getUpdateCount
See Also:   Statement.getMoreResults
See Also:   Statement.getGeneratedKeys
since:
   1.4




execute
public boolean execute(String sql, int columnIndexes) throws SQLException(Code)
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.

Under some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
  sql - any SQL statement
Parameters:
  columnIndexes - an array of the indexes of the columns in the inserted row that should be made available for retrieval by acall to the method getGeneratedKeys true if the first result is a ResultSet object; false if it is an update count or there are no results
exception:
  SQLException - if a database access error occurs
See Also:   Statement.getResultSet
See Also:   Statement.getUpdateCount
See Also:   Statement.getMoreResults
since:
   1.4




execute
public boolean execute(String sql, String columnNames) throws SQLException(Code)
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.

In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).
Parameters:
  sql - any SQL statement
Parameters:
  columnNames - an array of the names of the columns in the insertedrow that should be made available for retrieval by a call to themethod getGeneratedKeys true if the next result is a ResultSet object; false if it is an update count or there are no more results
exception:
  SQLException - if a database access error occurs
See Also:   Statement.getResultSet
See Also:   Statement.getUpdateCount
See Also:   Statement.getMoreResults
See Also:   Statement.getGeneratedKeys
since:
   1.4




executeBatch
public int[] executeBatch() throws SQLException(Code)
This QED release doesn't support batch statement execution.
exception:
  SQLException - "not implemented"



executeQuery
public java.sql.ResultSet executeQuery(String sql) throws SQLException(Code)
Execute the specified SQL query statement, returning the ResultSet object containing the results of the query.
Parameters:
  sql - an SQL query statement a ResultSet object containing the results ofthe query
exception:
  SQLException - may be thrown



executeUpdate
public int executeUpdate(String sql) throws SQLException(Code)
Execute the specified SQL update statement, returning the update count, meaning the number of rows updated or inserted by this statement.
Parameters:
  sql - an SQL update statement the update count
exception:
  SQLException - may be thrown



executeUpdate
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code)
Executes 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 - must be an SQL INSERT, UPDATE orDELETE statement or an SQL statement 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_KEYSStatement.NO_GENERATED_KEYS either the row count for INSERT,UPDATEor DELETE statements, or 0 for SQL statements that return nothing
exception:
  SQLException - if a database access error occurs, the givenSQL statement returns a ResultSet object, orthe given constant is not one of those allowed
since:
   1.4



executeUpdate
public int executeUpdate(String sql, int columnIndexes) throws SQLException(Code)
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 - an SQL INSERT, UPDATE orDELETE statement or an SQL statement that returnsnothing, such as an SQL DDL statement
Parameters:
  columnIndexes - an array of column indexes indicating the columnsthat should be returned from the inserted row either the row count for INSERT,UPDATE,or DELETE statements, or 0 for SQL statements that return nothing
exception:
  SQLException - if a database access error occurs or the SQLstatement returns a ResultSet object
since:
   1.4



executeUpdate
public int executeUpdate(String sql, String columnNames) throws SQLException(Code)
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 - an SQL INSERT, UPDATE orDELETE statement or an SQL statement that returns nothing
Parameters:
  columnNames - an array of the names of the columns that should be returned from the inserted row either the row count for INSERT, UPDATE,or DELETE statements, or 0 for SQL statements that return nothing
exception:
  SQLException - if a database access error occurs
since:
   1.4



finalize
public void finalize() throws Throwable(Code)
My short life is ended



getConnection
public java.sql.Connection getConnection()(Code)
Return the Connection object used to create this Statement object. this statement's connection.



getFetchDirection
public int getFetchDirection()(Code)
This release of QED only supports the fetch direction: ResultSet.FETCH_FORWARD ResultSet.FETCH_FORWARD



getFetchSize
public int getFetchSize()(Code)
In QED, the fetch size is always 1. one



getGeneratedKeys
public java.sql.ResultSet getGeneratedKeys() throws SQLException(Code)
Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet object is returned. a ResultSet object containing the auto-generatedkey(s) generated by the execution of thisStatement object
exception:
  SQLException - if a database access error occurs
since:
   1.4



getMaxFieldSize
public int getMaxFieldSize()(Code)
QED imposes no maximum field size. zero, meaning unlimited



getMaxRows
public int getMaxRows()(Code)
QED imposes no limit on the number of rows in a ResultSet. zero, meaning unlimited



getMoreResults
public boolean getMoreResults() throws SQLException(Code)
QED only returns one ResultSet per statement, so this function always returns false (after closing the current ResultSet object for this Statement. false
exception:
  SQLException - may be thrown



getMoreResults
public boolean getMoreResults(int current) throws SQLException(Code)
Moves to this Statement object'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.

There are no more results when the following is true:

 (!getMoreResults() && (getUpdateCount() == -1)
 

Parameters:
  current - one of the following Statementconstants indicating what should happen to current ResultSet objects obtained using the methodgetResultSetCLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, orCLOSE_ALL_RESULTS true if the next result is a ResultSet object; false if it is an update count or there are no more results
exception:
  SQLException - if a database access error occurs
since:
   1.4
See Also:   Statement.execute



getQueryTimeout
public int getQueryTimeout()(Code)
QED doesn't support query timeouts, so this method always returns zero. zero, meaning unlimited



getResultSet
public java.sql.ResultSet getResultSet()(Code)
Return the ResultSet generated by the last call to execute(), unless that ResultSet has been closed, or if there was no ResultSet generated by the last call to execute(), in which case, return null. the current ResultSet



getResultSetConcurrency
public int getResultSetConcurrency()(Code)
Return the default result set concurrency for ResultSet objects generated by this Statement object. the default result set concurrency



getResultSetHoldability
public int getResultSetHoldability() throws SQLException(Code)
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 - if a database access error occurs
since:
   1.4



getResultSetType
public int getResultSetType()(Code)
Return the default result set type for ResultSet objects generated by this Statement object. the default result set type



getUpdateCount
public int getUpdateCount()(Code)
Return the update count for the last statement executed. If no records were updated, inserted, or deleted, return -1. the update count for the last execute()operation



getWarnings
public SQLWarning getWarnings()(Code)
Since this QED release doesn't generate SQLWarnings, this function always returns null. null



setCursorName
public void setCursorName(String name) throws SQLException(Code)
This QED release doesn't support SQL named cursors
exception:
  SQLException - "not implemented"



setEscapeProcessing
public void setEscapeProcessing(boolean enable)(Code)
Enable or disable JDBC escape processing mode.



setFetchDirection
public void setFetchDirection(int dir) throws SQLException(Code)
Set the default fetch direction for ResultSet objects generated by this Statement object.



setFetchSize
public void setFetchSize(int x) throws SQLException(Code)
QED, being an embedded driver, fetches rows only when they are needed, with no performance penalty. Thus, the fetch size is always one, and this function has no effect.



setMaxFieldSize
public void setMaxFieldSize(int x) throws SQLException(Code)
Not implemented in this release of QED
exception:
  SQLException - "not implemented"



setMaxRows
public void setMaxRows(int x) throws SQLException(Code)
Set the maximum number of rows that will be returned by this ResultSet



setQueryTimeout
public void setQueryTimeout(int x) throws SQLException(Code)
Not implemented in this release of QED
exception:
  SQLException - "not implemented"



toString
public String toString()(Code)



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.