Java Doc for BrokeredPreparedStatement.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » 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.iapi.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.jdbc.BrokeredStatement
      org.apache.derby.iapi.jdbc.BrokeredPreparedStatement

All known Subclasses:   org.apache.derby.iapi.jdbc.BrokeredCallableStatement,  org.apache.derby.iapi.jdbc.BrokeredPreparedStatement30,
BrokeredPreparedStatement
public class BrokeredPreparedStatement extends BrokeredStatement implements EnginePreparedStatement(Code)
JDBC 2 brokered PreparedStatement. Forwards calls off to a real prepared statement obtained through the BrokeredStatementControl getRealPreparedStatement method.


Field Summary
final  Stringsql
     SQL used to create me.

Constructor Summary
public  BrokeredPreparedStatement(BrokeredStatementControl control, int jdbcLevel, String sql)
    

Method Summary
final public  voidaddBatch()
     JDBC 2.0 Add a set of parameters to the batch.
final public  voidclearParameters()
    

In general, parameter values remain in force for repeated use of a Statement.

public  PreparedStatementcreateDuplicateStatement(Connection conn, PreparedStatement oldStatement)
     Create a duplicate PreparedStatement to this, including state, from the passed in Connection.
final public  booleanexecute()
    
final public  ResultSetexecuteQuery()
     A prepared SQL query is executed and its ResultSet is returned.
final public  intexecuteUpdate()
     Execute a SQL INSERT, UPDATE or DELETE statement.
public  EngineParameterMetaDatagetEmbedParameterSetMetaData()
     Imitate the getParameterMetaData() function in JDBC 3.0 Retrieves the number, types and properties of this PreparedStatement object's parameters.
final public  java.sql.ResultSetMetaDatagetMetaData()
     JDBC 2.0 The number, types and properties of a ResultSet's columns are provided by the getMetaData method.
 PreparedStatementgetPreparedStatement()
     Access the underlying PreparedStatement.
final public  StatementgetStatement()
     Override the BrokeredStatement's getStatement() to always return a PreparedStatement.
final public  voidsetArray(int i, Array x)
    
final public  voidsetAsciiStream(int parameterIndex, InputStream x, int length)
     We do this inefficiently and read it all in here.
final public  voidsetBigDecimal(int parameterIndex, java.math.BigDecimal x)
     Set a parameter to a java.math.BigDecimal value.
final public  voidsetBinaryStream(int parameterIndex, InputStream x, int length)
    
final public  voidsetBlob(int i, Blob x)
    
final public  voidsetBoolean(int parameterIndex, boolean x)
     Set a parameter to a Java boolean value.
final public  voidsetByte(int parameterIndex, byte x)
     Set a parameter to a Java byte value.
final public  voidsetBytes(int parameterIndex, byte[] x)
     Set a parameter to a Java array of bytes.
final public  voidsetCharacterStream(int parameterIndex, Reader reader, int length)
    
final public  voidsetClob(int i, Clob x)
    
final public  voidsetDate(int parameterIndex, Date x)
     Set a parameter to a java.sql.Date value.
final public  voidsetDate(int i, Date x, Calendar cal)
    
final public  voidsetDouble(int parameterIndex, double x)
     Set a parameter to a Java double value.
final public  voidsetFloat(int parameterIndex, float x)
     Set a parameter to a Java float value.
final public  voidsetInt(int parameterIndex, int x)
     Set a parameter to a Java int value.
final public  voidsetLong(int parameterIndex, long x)
     Set a parameter to a Java long value.
final public  voidsetNull(int parameterIndex, int sqlType)
     Set a parameter to SQL NULL.
final public  voidsetNull(int parameterIndex, int sqlType, String typeName)
     Set a parameter to SQL NULL.
final public  voidsetObject(int parameterIndex, Object x, int targetSqlType, int scale)
     The interface says that the type of the Object parameter must be compatible with the type of the targetSqlType.
final public  voidsetObject(int parameterIndex, Object x, int targetSqlType)
     This method is like setObject above, but assumes a scale of zero.
final public  voidsetObject(int parameterIndex, Object x)
    

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The JDBC specification specifies a standard mapping from Java Object types to SQL types.

final public  voidsetRef(int i, Ref x)
    
final public  voidsetShort(int parameterIndex, short x)
     Set a parameter to a Java short value.
final public  voidsetString(int parameterIndex, String x)
     Set a parameter to a Java String value.
final public  voidsetTime(int parameterIndex, Time x)
     Set a parameter to a java.sql.Time value.
final public  voidsetTime(int i, Time x, Calendar cal)
    
final public  voidsetTimestamp(int parameterIndex, Timestamp x)
     Set a parameter to a java.sql.Timestamp value.
final public  voidsetTimestamp(int i, Timestamp x, Calendar cal)
    
final public  voidsetUnicodeStream(int parameterIndex, InputStream x, int length)
     We do this inefficiently and read it all in here.

Field Detail
sql
final String sql(Code)
SQL used to create me.




Constructor Detail
BrokeredPreparedStatement
public BrokeredPreparedStatement(BrokeredStatementControl control, int jdbcLevel, String sql) throws SQLException(Code)




Method Detail
addBatch
final public void addBatch() throws SQLException(Code)
JDBC 2.0 Add a set of parameters to the batch.
exception:
  SQLException - if a database-access error occurs.



clearParameters
final public void clearParameters() throws SQLException(Code)

In general, parameter values remain in force for repeated use of a Statement. Setting a parameter value automatically clears its previous value. However, in some cases it is useful to immediately release the resources used by the current parameter values; this can be done by calling clearParameters.
exception:
  SQLException - thrown on failure.




createDuplicateStatement
public PreparedStatement createDuplicateStatement(Connection conn, PreparedStatement oldStatement) throws SQLException(Code)
Create a duplicate PreparedStatement to this, including state, from the passed in Connection.



execute
final public boolean execute() throws SQLException(Code)

See Also:   java.sql.Statement.execute
exception:
  SQLException - thrown on failure.



executeQuery
final public ResultSet executeQuery() throws SQLException(Code)
A prepared SQL query is executed and its ResultSet is returned. a ResultSet that contains the data produced by thequery; never null
exception:
  SQLException - thrown on failure.



executeUpdate
final public int executeUpdate() 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. either the row count for INSERT, UPDATE or DELETE; or 0for SQL statements that return nothing
exception:
  SQLException - thrown on failure.



getEmbedParameterSetMetaData
public EngineParameterMetaData getEmbedParameterSetMetaData() throws SQLException(Code)
Imitate the getParameterMetaData() function in JDBC 3.0 Retrieves the number, types and properties of this PreparedStatement object's parameters. a EngineParameterMetaData object that contains information about thenumber, types and properties of this PreparedStatement object's parameters.
exception:
  SQLException - if a database access error occurs



getMetaData
final public java.sql.ResultSetMetaData getMetaData() throws SQLException(Code)
JDBC 2.0 The number, types and properties of a ResultSet's columns are provided by the getMetaData method. the description of a ResultSet's columns
exception:
  SQLException - Feature not implemented for now.



getPreparedStatement
PreparedStatement getPreparedStatement() throws SQLException(Code)
Access the underlying PreparedStatement. This method is package protected to restrict access to the underlying object to the brokered objects. Allowing the application to access the underlying object thtough a public method would



getStatement
final public Statement getStatement() throws SQLException(Code)
Override the BrokeredStatement's getStatement() to always return a PreparedStatement.



setArray
final public void setArray(int i, Array x) throws SQLException(Code)



setAsciiStream
final public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException(Code)
We do this inefficiently and read it all in here. The target type is assumed to be a String.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java input stream which contains the ASCII parameter value
Parameters:
  length - the number of bytes in the stream
exception:
  SQLException - thrown on failure.



setBigDecimal
final public void setBigDecimal(int parameterIndex, java.math.BigDecimal x) throws SQLException(Code)
Set a parameter to a java.math.BigDecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setBinaryStream
final public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException(Code)

Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java input stream which contains the binary parameter value
Parameters:
  length - the number of bytes in the stream
exception:
  SQLException - thrown on failure.



setBlob
final public void setBlob(int i, Blob x) throws SQLException(Code)



setBoolean
final public void setBoolean(int parameterIndex, boolean x) throws SQLException(Code)
Set a parameter to a Java boolean value. According to the JDBC API spec, the driver converts this to a SQL BIT value when it sends it to the database. But we don't have to do this, since the database engine supports a boolean type.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setByte
final public void setByte(int parameterIndex, byte x) throws SQLException(Code)
Set a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setBytes
final public void setBytes(int parameterIndex, byte[] x) throws SQLException(Code)
Set a parameter to a Java array of bytes. The driver converts this to a SQL VARBINARY or LONGVARBINARY (depending on the argument's size relative to the driver's limits on VARBINARYs) when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setCharacterStream
final public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException(Code)



setClob
final public void setClob(int i, Clob x) throws SQLException(Code)



setDate
final public void setDate(int parameterIndex, Date x) throws SQLException(Code)
Set a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setDate
final public void setDate(int i, Date x, Calendar cal) throws SQLException(Code)



setDouble
final public void setDouble(int parameterIndex, double x) throws SQLException(Code)
Set a parameter to a Java double value. The driver converts this to a SQL DOUBLE value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setFloat
final public void setFloat(int parameterIndex, float x) throws SQLException(Code)
Set a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setInt
final public void setInt(int parameterIndex, int x) throws SQLException(Code)
Set a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setLong
final public void setLong(int parameterIndex, long x) throws SQLException(Code)
Set a parameter to a Java long value. The driver converts this to a SQL BIGINT value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setNull
final public void setNull(int parameterIndex, int sqlType) throws SQLException(Code)
Set a parameter to SQL NULL.

Note: You must specify the parameter's SQL type.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  sqlType - SQL type code defined by java.sql.Types
exception:
  SQLException - thrown on failure.




setNull
final public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException(Code)
Set a parameter to SQL NULL.

Note: You must specify the parameter's SQL type.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  sqlType - SQL type code defined by java.sql.Types
exception:
  SQLException - thrown on failure.




setObject
final public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException(Code)
The interface says that the type of the Object parameter must be compatible with the type of the targetSqlType. We check that, and if it flies, we expect the underlying engine to do the required conversion once we pass in the value using its type. So, an Integer converting to a CHAR is done via setInteger() support on the underlying CHAR type.

If x is null, it won't tell us its type, so we pass it on to setNull
Parameters:
  parameterIndex - The first parameter is 1, the second is 2, ...
Parameters:
  x - The object containing the input parameter value
Parameters:
  targetSqlType - The SQL type (as defined in java.sql.Types) to be sent to the database. The scale argument may further qualify this type.
Parameters:
  scale - For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC typesthis is the number of digits after the decimal. For all othertypes this value will be ignored,
exception:
  SQLException - thrown on failure.




setObject
final public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException(Code)
This method is like setObject above, but assumes a scale of zero.
exception:
  SQLException - thrown on failure.



setObject
final public void setObject(int parameterIndex, Object x) throws SQLException(Code)

Set the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The JDBC specification specifies a standard mapping from Java Object types to SQL types. The given argument java object will be converted to the corresponding SQL type before being sent to the database.

Note that this method may be used to pass datatabase specific abstract data types, by using a Driver specific Java type.
Parameters:
  parameterIndex - The first parameter is 1, the second is 2, ...
Parameters:
  x - The object containing the input parameter value
exception:
  SQLException - thrown on failure.




setRef
final public void setRef(int i, Ref x) throws SQLException(Code)



setShort
final public void setShort(int parameterIndex, short x) throws SQLException(Code)
Set a parameter to a Java short value. The driver converts this to a SQL SMALLINT value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setString
final public void setString(int parameterIndex, String x) throws SQLException(Code)
Set a parameter to a Java String value. The driver converts this to a SQL VARCHAR or LONGVARCHAR value (depending on the arguments size relative to the driver's limits on VARCHARs) when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setTime
final public void setTime(int parameterIndex, Time x) throws SQLException(Code)
Set a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setTime
final public void setTime(int i, Time x, Calendar cal) throws SQLException(Code)



setTimestamp
final public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException(Code)
Set a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the parameter value
exception:
  SQLException - thrown on failure.



setTimestamp
final public void setTimestamp(int i, Timestamp x, Calendar cal) throws SQLException(Code)



setUnicodeStream
final public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException(Code)
We do this inefficiently and read it all in here. The target type is assumed to be a String. The unicode source is assumed to be in char[]. RESOLVE: might it be in UTF, instead? that'd be faster!
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java input stream which contains theUNICODE parameter value
Parameters:
  length - the number of bytes in the stream
exception:
  SQLException - thrown on failure.



Fields inherited from org.apache.derby.iapi.jdbc.BrokeredStatement
final BrokeredStatementControl control(Code)(Java Doc)
final int jdbcLevel(Code)(Java Doc)
final int resultSetConcurrency(Code)(Java Doc)
final int resultSetHoldability(Code)(Java Doc)
final int resultSetType(Code)(Java Doc)

Methods inherited from org.apache.derby.iapi.jdbc.BrokeredStatement
final public void addBatch(String sql) throws SQLException(Code)(Java Doc)
final public void cancel() throws SQLException(Code)(Java Doc)
final protected void checkIfClosed() throws SQLException(Code)(Java Doc)
final public void clearBatch() throws SQLException(Code)(Java Doc)
final public void clearWarnings() throws SQLException(Code)(Java Doc)
final public void close() throws SQLException(Code)(Java Doc)
final BrokeredStatementControl controlCheck() throws SQLException(Code)(Java Doc)
public Statement createDuplicateStatement(Connection conn, Statement oldStatement) throws SQLException(Code)(Java Doc)
final public boolean execute(String sql) throws SQLException(Code)(Java Doc)
final public boolean execute(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc)
final public boolean execute(String sql, int[] columnIndexes) throws SQLException(Code)(Java Doc)
final public boolean execute(String sql, String[] columnNames) throws SQLException(Code)(Java Doc)
final public int[] executeBatch() throws SQLException(Code)(Java Doc)
final public ResultSet executeQuery(String sql) throws SQLException(Code)(Java Doc)
final public int executeUpdate(String sql) throws SQLException(Code)(Java Doc)
final public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException(Code)(Java Doc)
final public int executeUpdate(String sql, int[] columnIndexes) throws SQLException(Code)(Java Doc)
final public int executeUpdate(String sql, String[] columnNames) throws SQLException(Code)(Java Doc)
final public Connection getConnection() throws SQLException(Code)(Java Doc)
final public int getFetchDirection() throws SQLException(Code)(Java Doc)
final public int getFetchSize() throws SQLException(Code)(Java Doc)
final public ResultSet getGeneratedKeys() throws SQLException(Code)(Java Doc)
final public int getMaxFieldSize() throws SQLException(Code)(Java Doc)
final public int getMaxRows() throws SQLException(Code)(Java Doc)
final public boolean getMoreResults() throws SQLException(Code)(Java Doc)
final public boolean getMoreResults(int current) throws SQLException(Code)(Java Doc)
final public int getQueryTimeout() throws SQLException(Code)(Java Doc)
final public ResultSet getResultSet() throws SQLException(Code)(Java Doc)
final public int getResultSetConcurrency() throws SQLException(Code)(Java Doc)
final public int getResultSetHoldability() throws SQLException(Code)(Java Doc)
final public int getResultSetType() throws SQLException(Code)(Java Doc)
public Statement getStatement() throws SQLException(Code)(Java Doc)
final public int getUpdateCount() throws SQLException(Code)(Java Doc)
final public SQLWarning getWarnings() throws SQLException(Code)(Java Doc)
protected boolean isClosed() throws SQLException(Code)(Java Doc)
public boolean isWrapperFor(Class iface) throws SQLException(Code)(Java Doc)
final public void setCursorName(String name) throws SQLException(Code)(Java Doc)
final public void setEscapeProcessing(boolean enable) throws SQLException(Code)(Java Doc)
final public void setFetchDirection(int direction) throws SQLException(Code)(Java Doc)
final public void setFetchSize(int rows) throws SQLException(Code)(Java Doc)
final public void setMaxFieldSize(int max) throws SQLException(Code)(Java Doc)
final public void setMaxRows(int max) throws SQLException(Code)(Java Doc)
final public void setQueryTimeout(int seconds) throws SQLException(Code)(Java Doc)
void setStatementState(Statement oldStatement, Statement newStatement) throws SQLException(Code)(Java Doc)
final ResultSet wrapResultSet(ResultSet rs)(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.