Java Doc for EmbedPreparedStatement.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
         org.apache.derby.impl.jdbc.EmbedPreparedStatement

All known Subclasses:   org.apache.derby.impl.jdbc.EmbedPreparedStatement20,  org.apache.derby.impl.jdbc.EmbedCallableStatement,  org.apache.derby.impl.jdbc.EmbedPreparedStatement169,
EmbedPreparedStatement
abstract public class EmbedPreparedStatement extends EmbedStatement implements EnginePreparedStatement(Code)
EmbedPreparedStatement is a local JDBC statement.

Supports

  • JSR169


Field Summary
protected  PreparedStatementpreparedStatement
    
protected  ResultSetMetaDatarMetaData
    

Constructor Summary
public  EmbedPreparedStatement(EmbedConnection conn, String sql, boolean forMetaData, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, int[] columnIndexes, String[] columnNames)
    

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

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

 voidcloseActions()
     Additional close to close our activation. In the case that a XAConnection is involved in the creation of this PreparedStatement for e.g in the following case XAConnection xaconn = xadatasource.getXAConnection();//where xadatasource is an object of XADataSource Connection conn = xaconnection.getConnection(); PreparedStatement ps = conn.preparedStatement("values 1"); In the above case the PreparedStatement will actually be a BrokeredPreparedStatement40 object.
final  SQLExceptiondataTypeConversion(int column, String sourceType)
    
final public  booleanexecute(String sql)
    
final public  booleanexecute(String sql, int autoGenKeys)
    
final public  booleanexecute(String sql, int[] columnIndexes)
    
final public  booleanexecute(String sql, String[] columnNames)
    
final public  booleanexecute()
    
 booleanexecuteBatchElement(Object batchElement)
    
final public  java.sql.ResultSetexecuteQuery(String sql)
    
final public  java.sql.ResultSetexecuteQuery()
     A prepared SQL query is executed and its ResultSet is returned.
 booleanexecuteStatement(Activation a, boolean executeQuery, boolean executeUpdate)
    
final public  intexecuteUpdate(String sql)
    
final public  intexecuteUpdate(String sql, int autoGenKeys)
    
final public  intexecuteUpdate(String sql, int[] columnIndexes)
    
final public  intexecuteUpdate(String sql, String[] columnNames)
    
final public  intexecuteUpdate()
     Execute a SQL INSERT, UPDATE or DELETE statement.
protected  voidfinalize()
     JDBC states that a Statement is closed when garbage collected.
public  EngineParameterMetaDatagetEmbedParameterSetMetaData()
     Immitate the function in JDBC 3.0 Retrieves the number, types and properties of this PreparedStatement object's parameters.
public  java.sql.ResultSetMetaDatagetMetaData()
     JDBC 2.0 The number, types and properties of a ResultSet's columns are provided by the getMetaData method.
protected  intgetParameterJDBCType(int parameterIndex)
     Get the target JDBC type for a parameter.
final protected  StringgetParameterSQLType(int parameterIndex)
     Return the SQL type name for the parameter.
final public  ParameterValueSetgetParms()
    
final protected  DataTypeDescriptor[]getTypes(int parameterIndex)
     Check the parameterINdex is in range and return the array of type descriptors.
protected  EmbedResultSetMetaDatanewEmbedResultSetMetaData(ResultDescription resultDesc)
    
final public  voidsetAsciiStream(int parameterIndex, InputStream x, long length)
     We do this inefficiently and read it all in here.
final public  voidsetAsciiStream(int parameterIndex, InputStream x, int length)
     We do this inefficiently and read it all in here.
public  voidsetAsciiStream(int parameterIndex, InputStream x)
     Sets the designated parameter to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream.
public  voidsetBinaryStream(int parameterIndex, InputStream x)
     Sets the designated parameter to the given input stream. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object.
final public  voidsetBinaryStream(int parameterIndex, InputStream x, long length)
    
final public  voidsetBinaryStream(int parameterIndex, InputStream x, int length)
    
public  voidsetBlob(int i, Blob x)
     JDBC 2.0 Set a BLOB parameter.
public  voidsetBlob(int parameterIndex, InputStream inputStream)
     Sets the designated parameter to a InputStream object. This method differs from the setBinaryStream(int, InputStream) method because it informs the driver that the parameter value should be sent to the server as a BLOB.
public  voidsetBlob(int parameterIndex, InputStream inputStream, long length)
     Sets the designated parameter to a InputStream object.
public  voidsetBoolean(int parameterIndex, boolean x)
     Set a parameter to a Java boolean value.
public  voidsetBrokeredConnectionControl(BrokeredConnectionControl control)
    
public  voidsetByte(int parameterIndex, byte x)
     Set a parameter to a Java byte value.
public  voidsetBytes(int parameterIndex, byte x)
     Set a parameter to a Java array of bytes.
final public  voidsetCharacterStream(int parameterIndex, java.io.Reader reader, long length)
     When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader.
final public  voidsetCharacterStream(int parameterIndex, java.io.Reader reader, int length)
     When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader.
public  voidsetCharacterStream(int parameterIndex, Reader reader)
     Sets the designated parameter to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object.
public  voidsetClob(int i, Clob x)
     JDBC 2.0 Set a CLOB parameter.
public  voidsetClob(int parameterIndex, Reader reader)
     Sets the designated parameter to a Reader object. This method differs from the setCharacterStream(int,Reader) method because it informs the driver that the parameter value should be sent to the server as a CLOB.
public  voidsetClob(int parameterIndex, Reader reader, long length)
     Sets the designated parameter to a Reader object.
public  voidsetDate(int parameterIndex, Date x)
     Set a parameter to a java.sql.Date value.
final public  voidsetDate(int parameterIndex, java.sql.Date x, Calendar cal)
     Set a parameter to a java.sql.Date value.
public  voidsetDouble(int parameterIndex, double x)
     Set a parameter to a Java double value.
public  voidsetFloat(int parameterIndex, float x)
     Set a parameter to a Java float value.
public  voidsetInt(int parameterIndex, int x)
     Set a parameter to a Java int value.
public  voidsetLong(int parameterIndex, long x)
     Set a parameter to a Java long value.
public  voidsetNull(int parameterIndex, int sqlType)
     Set a parameter to SQL NULL.
public  voidsetNull(int paramIndex, int sqlType, String typeName)
     JDBC 2.0 Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters.
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.

 booleansetObjectConvert(int parameterIndex, Object x)
     Allow explict setObject conversions by sub-classes for classes not supported by this variant.
public  voidsetShort(int parameterIndex, short x)
     Set a parameter to a Java short value.
public  voidsetString(int parameterIndex, String x)
     Set a parameter to a Java String value.
public  voidsetTime(int parameterIndex, Time x)
     Set a parameter to a java.sql.Time value.
final public  voidsetTime(int parameterIndex, java.sql.Time x, Calendar cal)
     Set a parameter to a java.sql.Time value.
public  voidsetTimestamp(int parameterIndex, Timestamp x)
     Set a parameter to a java.sql.Timestamp value.
final public  voidsetTimestamp(int parameterIndex, java.sql.Timestamp x, Calendar cal)
     Set a parameter to a java.sql.Timestamp value.
final public  voidsetURL(int parameterIndex, java.net.URL x)
     JDBC 3.0 Sets the designated parameter to the given java.net.URL value.
public  voidsetUnicodeStream(int parameterIndex, InputStream x, int length)
    
public  StringtoString()
    
public  voidtransferParameters(EmbedPreparedStatement newStatement)
    

Field Detail
preparedStatement
protected PreparedStatement preparedStatement(Code)



rMetaData
protected ResultSetMetaData rMetaData(Code)




Constructor Detail
EmbedPreparedStatement
public EmbedPreparedStatement(EmbedConnection conn, String sql, boolean forMetaData, int resultSetType, int resultSetConcurrency, int resultSetHoldability, int autoGeneratedKeys, int[] columnIndexes, String[] columnNames) throws SQLException(Code)




Method Detail
addBatch
final public void addBatch(String sql) throws SQLException(Code)



addBatch
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
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.




closeActions
void closeActions() throws SQLException(Code)
Additional close to close our activation. In the case that a XAConnection is involved in the creation of this PreparedStatement for e.g in the following case XAConnection xaconn = xadatasource.getXAConnection();//where xadatasource is an object of XADataSource Connection conn = xaconnection.getConnection(); PreparedStatement ps = conn.preparedStatement("values 1"); In the above case the PreparedStatement will actually be a BrokeredPreparedStatement40 object. Hence when we call bcc.onStatementClose and pass the PreparedStatement that caused it applicationStatement will be the appropriate choice since it will contain the appropriate instance of PreparedStatement in each case
throws:
  SQLException - upon failure



dataTypeConversion
final SQLException dataTypeConversion(int column, String sourceType) throws SQLException(Code)



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



execute
final public boolean execute(String sql, int autoGenKeys) throws SQLException(Code)



execute
final public boolean execute(String sql, int[] columnIndexes) throws SQLException(Code)



execute
final public boolean execute(String sql, String[] columnNames) throws SQLException(Code)



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

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



executeBatchElement
boolean executeBatchElement(Object batchElement) throws SQLException, StandardException(Code)



executeQuery
final public java.sql.ResultSet executeQuery(String sql) throws SQLException(Code)



executeQuery
final public java.sql.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.



executeStatement
boolean executeStatement(Activation a, boolean executeQuery, boolean executeUpdate) throws SQLException(Code)



executeUpdate
final public int executeUpdate(String sql) throws SQLException(Code)



executeUpdate
final public int executeUpdate(String sql, int autoGenKeys) throws SQLException(Code)



executeUpdate
final public int executeUpdate(String sql, int[] columnIndexes) throws SQLException(Code)



executeUpdate
final public int executeUpdate(String sql, String[] columnNames) throws SQLException(Code)



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.



finalize
protected void finalize() throws Throwable(Code)
JDBC states that a Statement is closed when garbage collected.
exception:
  Throwable - Allows any exception to be thrown during finalize



getEmbedParameterSetMetaData
public EngineParameterMetaData getEmbedParameterSetMetaData() throws SQLException(Code)
Immitate the 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
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.



getParameterJDBCType
protected int getParameterJDBCType(int parameterIndex) throws SQLException(Code)
Get the target JDBC type for a parameter. Will throw exceptions if the parameter index is out of range
exception:
  SQLException - parameter is out of range



getParameterSQLType
final protected String getParameterSQLType(int parameterIndex) throws SQLException(Code)
Return the SQL type name for the parameter.
Parameters:
  parameterIndex - the 1-based index of the parameter SQL name of the parameter
throws:
  SQLException - if parameter is out of range



getParms
final public ParameterValueSet getParms()(Code)
Get the ParameterValueSet from the activation The ParameterValueSet for the activation



getTypes
final protected DataTypeDescriptor[] getTypes(int parameterIndex) throws SQLException(Code)
Check the parameterINdex is in range and return the array of type descriptors.
exception:
  SQLException - parameter is out of range



newEmbedResultSetMetaData
protected EmbedResultSetMetaData newEmbedResultSetMetaData(ResultDescription resultDesc)(Code)



setAsciiStream
final public void setAsciiStream(int parameterIndex, InputStream x, long 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.



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.



setAsciiStream
public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException(Code)
Sets the designated parameter to the given input stream. When a very large ASCII value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. Data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from ASCII to the database char format. Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the Java input stream that contains the ASCII parameter value
throws:
  SQLException - if a database access error occurs or this method iscalled on a closed PreparedStatement



setBinaryStream
public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException(Code)
Sets the designated parameter to the given input stream. When a very large binary value is input to a LONGVARBINARY parameter, it may be more practical to send it via a java.io.InputStream object. The data will be read from the stream as needed until end-of-file is reached. Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  x - the java input stream which contains the binary parameter value
throws:
  SQLException - if a database access error occurs or this method iscalled on a closed PreparedStatement



setBinaryStream
final public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException(Code)
sets the parameter to the Binary stream
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.



setBinaryStream
final public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException(Code)
sets the parameter to the binary stream
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
public void setBlob(int i, Blob x) throws SQLException(Code)
JDBC 2.0 Set a BLOB parameter.
Parameters:
  i - the first parameter is 1, the second is 2, ...
Parameters:
  x - an object representing a BLOB



setBlob
public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException(Code)
Sets the designated parameter to a InputStream object. This method differs from the setBinaryStream(int, InputStream) method because it informs the driver that the parameter value should be sent to the server as a BLOB. When the setBinaryStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARBINARY or a BLOB
Parameters:
  parameterIndex - index of the first parameter is 1, the second is2, ...
Parameters:
  inputStream - an object that contains the data to set the parametervalue to.
throws:
  SQLException - if a database access error occurs, this method iscalled on a closed PreparedStatement or ifparameterIndex does not correspond to a parametermarker in the SQL statement



setBlob
public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException(Code)
Sets the designated parameter to a InputStream object.
Parameters:
  parameterIndex - index of the first parameter is 1,the second is 2, ...
Parameters:
  inputStream - An object that contains the data to set the parametervalue to.
Parameters:
  length - the number of bytes in the parameter data.
throws:
  SQLException - if parameterIndex does not correspondto a parameter marker in the SQL statement, if the length specifiedis less than zero or if the number of bytes in the inputstream does not matchthe specfied length.



setBoolean
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.



setBrokeredConnectionControl
public void setBrokeredConnectionControl(BrokeredConnectionControl control)(Code)



setByte
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
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, java.io.Reader reader, long length) throws SQLException(Code)
When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  reader - the java reader which contains the UNICODE data
Parameters:
  length - the number of characters in the stream
exception:
  SQLException - if a database-access error occurs.




setCharacterStream
final public void setCharacterStream(int parameterIndex, java.io.Reader reader, int length) throws SQLException(Code)
When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  reader - the java reader which contains the UNICODE data
Parameters:
  length - the number of characters in the stream
exception:
  SQLException - if a database-access error occurs.




setCharacterStream
public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException(Code)
Sets the designated parameter to the given Reader object. When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader object. The data will be read from the stream as needed until end-of-file is reached. The JDBC driver will do any necessary conversion from UNICODE to the database char format. Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface. Using this lengthless overload is not less effective than using one where the stream length is specified, but since there is no length specified, the exact length check will not be performed.
Parameters:
  parameterIndex - the first parameter is 1, the second is 2, ...
Parameters:
  reader - the java.io.Reader object that contains theUnicode data
throws:
  SQLException - if a database access error occurs or this method iscalled on a closed PreparedStatement



setClob
public void setClob(int i, Clob x) throws SQLException(Code)
JDBC 2.0 Set a CLOB parameter.
Parameters:
  i - the first parameter is 1, the second is 2, ...
Parameters:
  x - an object representing a CLOB



setClob
public void setClob(int parameterIndex, Reader reader) throws SQLException(Code)
Sets the designated parameter to a Reader object. This method differs from the setCharacterStream(int,Reader) method because it informs the driver that the parameter value should be sent to the server as a CLOB. When the setCharacterStream method is used, the driver may have to do extra work to determine whether the parameter data should be sent to the server as a LONGVARCHAR or a CLOB.
Parameters:
  parameterIndex - index of the first parameter is 1, the second is2, ...
Parameters:
  reader - an object that contains the data to set the parametervalue to.
throws:
  SQLException - if a database access error occurs, this method iscalled on a closed PreparedStatementor if parameterIndex does notcorrespond to a parameter marker in the SQL statement



setClob
public void setClob(int parameterIndex, Reader reader, long length) throws SQLException(Code)
Sets the designated parameter to a Reader object.
Parameters:
  parameterIndex - index of the first parameter is 1, the second is 2, ...
Parameters:
  reader - An object that contains the data to set the parameter value to.
Parameters:
  length - the number of characters in the parameter data.
throws:
  SQLException - if parameterIndex does not correspond to a parametermarker in the SQL statement, or if the length specified is less than zero.



setDate
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 parameterIndex, java.sql.Date x, Calendar cal) 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 - Feature not implemented for now.



setDouble
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
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
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
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
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
public void setNull(int paramIndex, int sqlType, String typeName) throws SQLException(Code)
JDBC 2.0 Sets the designated parameter to SQL NULL. This version of the method setNull should be used for user-defined types and REF type parameters. Examples of user-defined types include: STRUCT, DISTINCT, JAVA_OBJECT, and named array types.
Parameters:
  paramIndex - the first parameter is 1, the second is 2, ...
Parameters:
  sqlType - a value from java.sql.Types
Parameters:
  typeName - the fully-qualified name of an SQL user-defined type;ignored if the parameter is not a user-defined type or REF
exception:
  SQLException - if a database access error occurs orthis method is called on a closed PreparedStatement
exception:
  SQLFeatureNotSupportedException - if sqlType isa ARRAY, BLOB, CLOB,DATALINK, JAVA_OBJECT, NCHAR,NCLOB, NVARCHAR, LONGNVARCHAR,REF, ROWID, SQLXMLor STRUCT data type and the JDBC driver does not supportthis data type or if the JDBC driver does not support this method



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.




setObjectConvert
boolean setObjectConvert(int parameterIndex, Object x) throws SQLException(Code)
Allow explict setObject conversions by sub-classes for classes not supported by this variant. E.g. BigDecimal This top-level implementation always returns false. true if the object was set successfully, false if no validconversion exists.
exception:
  SQLException - value could not be set.



setShort
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
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
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 parameterIndex, java.sql.Time x, Calendar cal) 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 - Feature not implemented for now.



setTimestamp
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 parameterIndex, java.sql.Timestamp x, Calendar cal) 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 - Feature not implemented for now.



setURL
final public void setURL(int parameterIndex, java.net.URL x) throws SQLException(Code)
JDBC 3.0 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.
Parameters:
  parameterIndex - - the first parameter is 1, the second is 2, ...
Parameters:
  x - - the java.net.URL object to be set
exception:
  SQLException - Feature not implemented for now.



setUnicodeStream
public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException(Code)
Deprecated in JDBC 3.0
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.



toString
public String toString()(Code)



transferParameters
public void transferParameters(EmbedPreparedStatement newStatement) throws SQLException(Code)



Fields inherited from org.apache.derby.impl.jdbc.EmbedStatement
int MaxFieldSize(Code)(Java Doc)
String SQLText(Code)(Java Doc)
protected EngineStatement applicationStatement(Code)(Java Doc)
Vector batchStatements(Code)(Java Doc)
protected boolean isPoolable(Code)(Java Doc)
final LanguageConnectionContext lcc(Code)(Java Doc)
int maxRows(Code)(Java Doc)
final int resultSetType(Code)(Java Doc)
java.sql.ResultSet results(Code)(Java Doc)
int updateCount(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.jdbc.EmbedStatement
public void addBatch(String sql) throws SQLException(Code)(Java Doc)
final void addWarning(SQLWarning sw)(Code)(Java Doc)
public void cancel() throws SQLException(Code)(Java Doc)
final void checkExecStatus() throws SQLException(Code)(Java Doc)
final void checkIfInMiddleOfBatch() throws SQLException(Code)(Java Doc)
void checkRequiresCallableStatement(Activation activation) throws SQLException(Code)(Java Doc)
final void checkStatus() throws SQLException(Code)(Java Doc)
final public void clearBatch() throws SQLException(Code)(Java Doc)
void clearResultSets() throws SQLException(Code)(Java Doc)
public void clearWarnings() throws SQLException(Code)(Java Doc)
final public void close() throws SQLException(Code)(Java Doc)
void closeActions() throws SQLException(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)
boolean executeBatchElement(Object batchElement) throws SQLException, StandardException(Code)(Java Doc)
public java.sql.ResultSet executeQuery(String sql) throws SQLException(Code)(Java Doc)
boolean executeStatement(Activation a, boolean executeQuery, boolean executeUpdate) 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)
final public java.sql.Connection getConnection() throws SQLException(Code)(Java Doc)
public int getFetchDirection() throws SQLException(Code)(Java Doc)
public int getFetchSize() throws SQLException(Code)(Java Doc)
final public java.sql.ResultSet getGeneratedKeys() throws SQLException(Code)(Java Doc)
public int getMaxFieldSize() throws SQLException(Code)(Java Doc)
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)
public ParameterValueSet getParameterValueSet()(Code)(Java Doc)
final public int getQueryTimeout() throws SQLException(Code)(Java Doc)
final public java.sql.ResultSet getResultSet() throws SQLException(Code)(Java Doc)
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 String getSQLText()(Code)(Java Doc)
final public int getUpdateCount() throws SQLException(Code)(Java Doc)
public SQLWarning getWarnings() throws SQLException(Code)(Java Doc)
public boolean isClosed() throws SQLException(Code)(Java Doc)
public boolean isPoolable() throws SQLException(Code)(Java Doc)
void resultSetClosing(EmbedResultSet closingLRS) throws SQLException(Code)(Java Doc)
final public void setApplicationStatement(EngineStatement s)(Code)(Java Doc)
public void setCursorName(String name) throws SQLException(Code)(Java Doc)
public void setEscapeProcessing(boolean enable) throws SQLException(Code)(Java Doc)
public void setFetchDirection(int direction) throws SQLException(Code)(Java Doc)
public void setFetchSize(int rows) throws SQLException(Code)(Java Doc)
public void setMaxFieldSize(int max) throws SQLException(Code)(Java Doc)
public void setMaxRows(int max) throws SQLException(Code)(Java Doc)
public void setPoolable(boolean poolable) throws SQLException(Code)(Java Doc)
final public void setQueryTimeout(int seconds) throws SQLException(Code)(Java Doc)
public void transferBatch(EmbedStatement other) throws SQLException(Code)(Java Doc)

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.