Java Doc for PreparedStatement.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
      com.quadcap.jdbc.PreparedStatement

PreparedStatement
public class PreparedStatement extends Statement implements java.sql.PreparedStatement(Code)
This class implements the java.sql.PreparedStatement interface, and provides facilities for execution of pre-compiled SQL statements. This release of QED performs all of the SQL parsing during the prepare phase, so that subsequent execution of the compiled statement is considerably faster than directly executing the statement using the Statement interface.
author:
   Stan Bailes


Field Summary
 Vectorparams
    
 Stringsql
    
 Stmtstmt
    

Constructor Summary
public  PreparedStatement(Connection conn, String sql)
    
public  PreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency)
    

Method Summary
public  voidaddBatch()
     This QED release doesn't support batch statement execution.
public  voidclearParameters()
    
public  booleanexecute()
     Execute the current SQL statement, returning true if the statement generates a ResultSet object.
public  java.sql.ResultSetexecuteQuery()
     Execute the prepared SQL query statement, returning the ResultSet object containing the results of the query.
public  intexecuteUpdate()
     Execute the prepared SQL update statement, returning the update count, meaning the number of rows updated or inserted by this statement.
public  java.sql.ResultSetMetaDatagetMetaData()
     QED doesn't implement this feature, which requires information about the ResultSet that will be generated by this PreparedStatement object when it is executed.
 ParameterExpressiongetParam(int i)
    
public  java.sql.ParameterMetaDatagetParameterMetaData()
     Retrieves the number, types and properties of this PreparedStatement object's parameters.
public  voidsetArray(int col, Array val)
     Set the statement parameter to the specified ARRAY value.
public  voidsetAsciiStream(int col, InputStream in, int length)
     Set the statement parameter to the specified character value using an InputStream that contains a stream of ASCII bytes.
public  voidsetBigDecimal(int col, BigDecimal val)
     Set the statement parameter to the specified BigDecimal value.
public  voidsetBinaryStream(int col, InputStream in, int length)
     Set the statement parameter to the specified binary value using an InputStream that contains a stream of bytes.
Parameters:
  col - the parameter index
Parameters:
  is - an input stream containing ASCII bytes.
Parameters:
  length - the number of bytes to read from the stream

If 'length > 0', then the blob's length will be set to the valueof the 'length' parameter.

If 'length < 0', then the blob's length will be set to the numberof bytes read.

public  voidsetBlob(int col, Blob val)
     Set the statement parameter to the specified Blob value.
public  voidsetBoolean(int col, boolean val)
     Set the statement parameter to the specified boolean value.
public  voidsetByte(int col, byte val)
     Set the statement parameter to the specified byte value.
public  voidsetBytes(int col, byte[] val)
     Set the statement parameter to the specified byte array value.
public  voidsetCharacterStream(int col, Reader r, int length)
     Set the statement parameter to the specified character value using a Reader that contains a stream of Unicode characters.
public  voidsetClob(int col, Clob val)
     Set the statement parameter to the specified Clob value.
public  voidsetDate(int col, Date val)
     Set the statement parameter to the specified Date value.
public  voidsetDate(int col, Date val, Calendar cal)
     Set the statement parameter to the specified Date value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  cal - a Calendar object that is used for convertingthe database date to the local timezone.
public  voidsetDouble(int col, double val)
     Set the statement parameter to the specified double value.
public  voidsetFloat(int col, float val)
     Set the statement parameter to the specified float value.
public  voidsetInt(int col, int val)
     Set the statement parameter to the specified int value.
public  voidsetLong(int col, long val)
     Set the statement parameter to the specified long value.
public  voidsetNull(int col, int type)
     Set the statement parameter to the specified null value.
Parameters:
  col - the parameter index
Parameters:
  type - the JDBC type of the parameter.
public  voidsetNull(int col, int type, String typename)
     Set the statement parameter to the specified null value.
Parameters:
  col - the parameter index
Parameters:
  type - the JDBC type of the parameter.
public  voidsetObject(int col, Object val)
     Set the statement parameter to the specified Object value.
public  voidsetObject(int col, Object val, int type)
     Set the statement parameter to the specified Object value.
public  voidsetObject(int col, Object val, int type, int scale)
     Set the statement parameter to the specified Object value.
final  voidsetParamValue(int col, Value v)
    
public  voidsetRef(int col, Ref val)
     Set the statement parameter to the specified REF value.
public  voidsetShort(int col, short val)
     Set the statement parameter to the specified short value.
public  voidsetString(int col, String val)
     Set the statement parameter to the specified String value.
public  voidsetTime(int col, Time val)
     Set the statement parameter to the specified Time value.
public  voidsetTime(int col, Time val, Calendar cal)
     Set the statement parameter to the specified Time value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  cal - a Calendar object that is used for convertingthe database date to the local timezone.
public  voidsetTimestamp(int col, Timestamp val)
     Set the statement parameter to the specified Timestamp value.
public  voidsetTimestamp(int col, Timestamp val, Calendar cal)
     Set the statement parameter to the specified Timestamp value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  cal - a Calendar object that is used for convertingthe database date to the local timezone.
public  voidsetURL(int parameterIndex, java.net.URL x)
     Sets the designated parameter to the given java.net.URL value.
public  voidsetUnicodeStream(int col, InputStream in, int length)
    
public  StringtoString()
    

Field Detail
params
Vector params(Code)



sql
String sql(Code)



stmt
Stmt stmt(Code)




Constructor Detail
PreparedStatement
public PreparedStatement(Connection conn, String sql) throws SQLException, IOException(Code)



PreparedStatement
public PreparedStatement(Connection conn, String sql, int resultSetType, int resultSetConcurrency) throws SQLException, IOException(Code)




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



clearParameters
public void clearParameters() throws SQLException(Code)
Clear the values of any parameters to this prepared statement; i.e., set them all to NULL
exception:
  SQLException - may be thrown



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



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



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



getMetaData
public java.sql.ResultSetMetaData getMetaData()(Code)
QED doesn't implement this feature, which requires information about the ResultSet that will be generated by this PreparedStatement object when it is executed. Instead, first call execute() or executeQuery(), then call ResultSet.getMetaData() on the ResultSet object that is returned. null



getParam
ParameterExpression getParam(int i)(Code)



getParameterMetaData
public java.sql.ParameterMetaData getParameterMetaData() throws SQLException(Code)
Retrieves the number, types and properties of this PreparedStatement object's parameters.

QED: Not implemented

a ParameterMetaData object that contains informationabout the number, types and properties of this PreparedStatement object's parameters
exception:
  SQLException - if a database access error occurs
See Also:   ParameterMetaData
since:
   1.4



setArray
public void setArray(int col, Array val) throws SQLException(Code)
Set the statement parameter to the specified ARRAY value. This QED release doesn't support ARRAY types, so a "not implemented" exception is thrown
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - "not implemented"



setAsciiStream
public void setAsciiStream(int col, InputStream in, int length) throws SQLException(Code)
Set the statement parameter to the specified character value using an InputStream that contains a stream of ASCII bytes. The ASCII bytes are converted to Unicode character values before being inserted into the database.
Parameters:
  col - the parameter index
Parameters:
  is - an input stream containing ASCII bytes.
Parameters:
  length - the number of bytes to read from the stream an InputStream
exception:
  SQLException - may be thrown



setBigDecimal
public void setBigDecimal(int col, BigDecimal val) throws SQLException(Code)
Set the statement parameter to the specified BigDecimal value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setBinaryStream
public void setBinaryStream(int col, InputStream in, int length) throws SQLException(Code)
Set the statement parameter to the specified binary value using an InputStream that contains a stream of bytes.
Parameters:
  col - the parameter index
Parameters:
  is - an input stream containing ASCII bytes.
Parameters:
  length - the number of bytes to read from the stream

If 'length > 0', then the blob's length will be set to the valueof the 'length' parameter.

If 'length < 0', then the blob's length will be set to the numberof bytes read. an InputStream
exception:
  SQLException - may be thrown




setBlob
public void setBlob(int col, Blob val) throws SQLException(Code)
Set the statement parameter to the specified Blob value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setBoolean
public void setBoolean(int col, boolean val) throws SQLException(Code)
Set the statement parameter to the specified boolean value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setByte
public void setByte(int col, byte val) throws SQLException(Code)
Set the statement parameter to the specified byte value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setBytes
public void setBytes(int col, byte[] val) throws SQLException(Code)
Set the statement parameter to the specified byte array value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setCharacterStream
public void setCharacterStream(int col, Reader r, int length) throws SQLException(Code)
Set the statement parameter to the specified character value using a Reader that contains a stream of Unicode characters.
Parameters:
  col - the parameter index
Parameters:
  r - a reader containing the value's characters.
Parameters:
  length - the number of bytes to read from the stream an InputStream
exception:
  SQLException - may be thrown



setClob
public void setClob(int col, Clob val) throws SQLException(Code)
Set the statement parameter to the specified Clob value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setDate
public void setDate(int col, Date val) throws SQLException(Code)
Set the statement parameter to the specified Date value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setDate
public void setDate(int col, Date val, Calendar cal) throws SQLException(Code)
Set the statement parameter to the specified Date value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  cal - a Calendar object that is used for convertingthe database date to the local timezone. The database date isadjusted based on the Calendar timezone and DST offset.
exception:
  SQLException - may be thrown



setDouble
public void setDouble(int col, double val) throws SQLException(Code)
Set the statement parameter to the specified double value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setFloat
public void setFloat(int col, float val) throws SQLException(Code)
Set the statement parameter to the specified float value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setInt
public void setInt(int col, int val) throws SQLException(Code)
Set the statement parameter to the specified int value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setLong
public void setLong(int col, long val) throws SQLException(Code)
Set the statement parameter to the specified long value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setNull
public void setNull(int col, int type) throws SQLException(Code)
Set the statement parameter to the specified null value.
Parameters:
  col - the parameter index
Parameters:
  type - the JDBC type of the parameter. This is ignored by QEDbecause a null is a null is a null.
exception:
  SQLException - may be thrown



setNull
public void setNull(int col, int type, String typename) throws SQLException(Code)
Set the statement parameter to the specified null value.
Parameters:
  col - the parameter index
Parameters:
  type - the JDBC type of the parameter. This is ignored by QEDbecause a null is a null is a null.
Parameters:
  typename - the fully qualified type name of the parameter.This is ignored by QEDbecause a null is a null is a null.
exception:
  SQLException - may be thrown



setObject
public void setObject(int col, Object val) throws SQLException(Code)
Set the statement parameter to the specified Object value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setObject
public void setObject(int col, Object val, int type) throws SQLException(Code)
Set the statement parameter to the specified Object value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  type - the JDBC type of the parameter.
exception:
  SQLException - may be thrown



setObject
public void setObject(int col, Object val, int type, int scale) throws SQLException(Code)
Set the statement parameter to the specified Object value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  type - the JDBC type of the parameter.
Parameters:
  scale - for numeric types, the precision of the value.
exception:
  SQLException - may be thrown



setParamValue
final void setParamValue(int col, Value v) throws SQLException(Code)



setRef
public void setRef(int col, Ref val) throws SQLException(Code)
Set the statement parameter to the specified REF value. This QED release doesn't support ARRAY types, so a "not implemented" exception is thrown
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - "not implemented"



setShort
public void setShort(int col, short val) throws SQLException(Code)
Set the statement parameter to the specified short value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setString
public void setString(int col, String val) throws SQLException(Code)
Set the statement parameter to the specified String value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setTime
public void setTime(int col, Time val) throws SQLException(Code)
Set the statement parameter to the specified Time value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setTime
public void setTime(int col, Time val, Calendar cal) throws SQLException(Code)
Set the statement parameter to the specified Time value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  cal - a Calendar object that is used for convertingthe database date to the local timezone. The database date isadjusted based on the Calendar timezone and DST offset.
exception:
  SQLException - may be thrown



setTimestamp
public void setTimestamp(int col, Timestamp val) throws SQLException(Code)
Set the statement parameter to the specified Timestamp value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
exception:
  SQLException - may be thrown



setTimestamp
public void setTimestamp(int col, Timestamp val, Calendar cal) throws SQLException(Code)
Set the statement parameter to the specified Timestamp value.
Parameters:
  col - the parameter index
Parameters:
  val - the new value
Parameters:
  cal - a Calendar object that is used for convertingthe database date to the local timezone. The database date isadjusted based on the Calendar timezone and DST offset.
exception:
  SQLException - may be thrown



setURL
public void setURL(int parameterIndex, java.net.URL x) throws SQLException(Code)
Sets the designated parameter to the given java.net.URL value. The driver converts this to an SQL DATALINK value when it sends it to the database.

QED simply converts the URL to a string


Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java.net.URL object to be set
exception:
  SQLException - if a database access error occurs
since:
   1.4



setUnicodeStream
public void setUnicodeStream(int col, InputStream in, int length) throws SQLException(Code)



toString
public String toString()(Code)



Fields inherited from com.quadcap.jdbc.Statement
Connection conn(Code)(Java Doc)
protected boolean escapeProcessing(Code)(Java Doc)
int maxRows(Code)(Java Doc)
com.quadcap.sql.Connection qConn(Code)(Java Doc)
int resultSetConcurrency(Code)(Java Doc)
int resultSetType(Code)(Java Doc)
ResultSet rs(Code)(Java Doc)
Session session(Code)(Java Doc)
final static ConfigNumber trace(Code)(Java Doc)
int updateCount(Code)(Java Doc)

Methods inherited from com.quadcap.jdbc.Statement
public void addBatch(String sql) throws SQLException(Code)(Java Doc)
public void cancel() throws SQLException(Code)(Java Doc)
public void clearBatch() throws SQLException(Code)(Java Doc)
public void clearWarnings()(Code)(Java Doc)
public void close()(Code)(Java Doc)
public boolean execute(String sql) throws SQLException(Code)(Java Doc)
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc)
public boolean execute(String sql, int columnIndexes) throws SQLException(Code)(Java Doc)
public boolean execute(String sql, String columnNames) throws SQLException(Code)(Java Doc)
public int[] executeBatch() throws SQLException(Code)(Java Doc)
public java.sql.ResultSet executeQuery(String sql) throws SQLException(Code)(Java Doc)
public int executeUpdate(String sql) throws SQLException(Code)(Java Doc)
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc)
public int executeUpdate(String sql, int columnIndexes) throws SQLException(Code)(Java Doc)
public int executeUpdate(String sql, String columnNames) throws SQLException(Code)(Java Doc)
public void finalize() throws Throwable(Code)(Java Doc)
public java.sql.Connection getConnection()(Code)(Java Doc)
public int getFetchDirection()(Code)(Java Doc)
public int getFetchSize()(Code)(Java Doc)
public java.sql.ResultSet getGeneratedKeys() throws SQLException(Code)(Java Doc)
public int getMaxFieldSize()(Code)(Java Doc)
public int getMaxRows()(Code)(Java Doc)
public boolean getMoreResults() throws SQLException(Code)(Java Doc)
public boolean getMoreResults(int current) throws SQLException(Code)(Java Doc)
public int getQueryTimeout()(Code)(Java Doc)
public java.sql.ResultSet getResultSet()(Code)(Java Doc)
public int getResultSetConcurrency()(Code)(Java Doc)
public int getResultSetHoldability() throws SQLException(Code)(Java Doc)
public int getResultSetType()(Code)(Java Doc)
public int getUpdateCount()(Code)(Java Doc)
public SQLWarning getWarnings()(Code)(Java Doc)
public void setCursorName(String name) throws SQLException(Code)(Java Doc)
public void setEscapeProcessing(boolean enable)(Code)(Java Doc)
public void setFetchDirection(int dir) throws SQLException(Code)(Java Doc)
public void setFetchSize(int x) throws SQLException(Code)(Java Doc)
public void setMaxFieldSize(int x) throws SQLException(Code)(Java Doc)
public void setMaxRows(int x) throws SQLException(Code)(Java Doc)
public void setQueryTimeout(int x) throws SQLException(Code)(Java Doc)
public String toString()(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.