org.objectweb.cjdbc.driver
Class PreparedStatement

java.lang.Object
  extended byorg.objectweb.cjdbc.driver.Statement
      extended byorg.objectweb.cjdbc.driver.PreparedStatement
All Implemented Interfaces:
java.sql.PreparedStatement, java.sql.Statement
Direct Known Subclasses:
CallableStatement

public class PreparedStatement
extends Statement
implements java.sql.PreparedStatement

A SQL Statement is pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: The setXXX methods for setting IN parameter values must specify types that are compatible with the defined SQL type of the input parameter. For instance, if the IN parameter has SQL type Integer, then setInt should be used.

If arbitrary parameter type conversions are required, then the setObject method should be used with a target SQL type.

For instance, this is just a dirty copy/paste from the PostgreSQL driver ! Implementation has to be completly checked and revised.

Version:
1.0
Author:
Emmanuel Cecchet, Nicolas Modrzyk, Marc Wick
See Also:
ResultSet, PreparedStatement

Field Summary
private  java.lang.String[] inStrings
           
private  java.lang.StringBuffer sbuf
           
protected  java.lang.String sql
           
private  java.lang.String[] templateStrings
           
 
Fields inherited from class org.objectweb.cjdbc.driver.Statement
connection, escapeProcessing, generatedKeys, generatedKeysFlag
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Constructor Summary
PreparedStatement(Connection connection, java.lang.String sqlStatement)
          Constructor.
 
Method Summary
 void addBatch()
          This parses the query and adds it to the current batch
 void clearParameters()
          In general, parameter values remain in force for repeated used of a Statement.
 void close()
          Release objects for garbage collection and call Statement.close().
protected  java.lang.String compileQuery()
          Helper - this compiles the SQL query from the various parameters This is identical to toString() except it throws an exception if a parameter is unused.
 boolean execute()
          Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by executeQuery() and executeUpdate().
 java.sql.ResultSet executeQuery()
          A Prepared SQL query is executed and its ResultSet is returned.
 int executeUpdate()
          Execute a SQL INSERT, UPDATE or DELETE statement.
 java.sql.ResultSetMetaData getMetaData()
          Returns the MetaData for the last ResultSet returned.
 java.sql.ParameterMetaData getParameterMetaData()
          Retrieves the number, types and properties of this PreparedStatement object's parameters.
private  void set(int paramIndex, java.lang.String s)
          There are a lot of setXXX classes which all basically do the same thing.
 void setArray(int i, java.sql.Array x)
           
 void setAsciiStream(int parameterIndex, java.io.InputStream x, int length)
          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.
 void setBigDecimal(int parameterIndex, java.math.BigDecimal x)
          Sets a parameter to a java.lang.BigDecimal value.
 void setBinaryStream(int parameterIndex, java.io.InputStream x, int length)
          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.
 void setBlob(int parameterIndex, java.sql.Blob x)
          Sets a parameter to a java.sql.Blob value.
 void setBlob(int i, Blob x)
           
 void setBoolean(int parameterIndex, boolean x)
          Sets a parameter to a Java boolean value.
 void setByte(int parameterIndex, byte x)
          Sets a parameter to a Java byte value.
 void setBytes(int parameterIndex, byte[] x)
          Sets a parameter to a Java array of bytes.
 void setCharacterStream(int i, java.io.Reader x, int length)
           
 void setClob(int i, java.sql.Clob x)
           
 void setDate(int parameterIndex, java.sql.Date x)
          Sets a parameter to a java.sql.Date value.
 void setDate(int i, java.sql.Date d, java.util.Calendar cal)
           
 void setDouble(int parameterIndex, double x)
          Sets a parameter to a Java double value.
 void setFloat(int parameterIndex, float x)
          Sets a parameter to a Java float value.
protected  void setGeneratedKeysFlag(int autoGeneratedKeys)
          Set the auto generated key flag defined in Statement
 void setInt(int parameterIndex, int x)
          Sets a parameter to a Java int value.
 void setLong(int parameterIndex, long x)
          Sets a parameter to a Java long value.
 void setNull(int parameterIndex, int sqlType)
          Sets a parameter to SQL NULL.
 void setNull(int i, int t, java.lang.String s)
           
 void setObject(int parameterIndex, java.lang.Object x)
          This stores an Object into a parameter.
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType)
           
 void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale)
          Sets the value of a parameter using an object; use the java.lang equivalent objects for integral values.
 void setRef(int i, java.sql.Ref x)
           
 void setShort(int parameterIndex, short x)
          Sets a parameter to a Java short value.
 void setString(int parameterIndex, java.lang.String x)
          Sets a parameter to a Java String value.
 void setTime(int parameterIndex, java.sql.Time x)
          Sets a parameter to a java.sql.Time value.
 void setTime(int i, java.sql.Time t, java.util.Calendar cal)
           
 void setTimestamp(int parameterIndex, java.sql.Timestamp x)
          Sets a parameter to a java.sql.Timestamp value.
 void setTimestamp(int i, java.sql.Timestamp t, java.util.Calendar cal)
           
 void setUnicodeStream(int parameterIndex, java.io.InputStream x, int length)
          Deprecated.  
 void setURL(int parameterIndex, java.net.URL x)
          Sets the designated parameter to the given java.net.URL value.
 java.lang.String toString()
          Returns the SQL statement with the current template values substituted.
 
Methods inherited from class org.objectweb.cjdbc.driver.Statement
addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdateWithSkeleton, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout, setResultSetConcurrency, setResultSetType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, execute, execute, execute, execute, executeBatch, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Field Detail

sql

protected java.lang.String sql

templateStrings

private java.lang.String[] templateStrings

inStrings

private java.lang.String[] inStrings

sbuf

private java.lang.StringBuffer sbuf
Constructor Detail

PreparedStatement

public PreparedStatement(Connection connection,
                         java.lang.String sqlStatement)
                  throws java.sql.SQLException
Constructor. Splits the SQL statement into segments - separated by the arguments. When we rebuild the thing with the arguments, we can substitute the args and join the whole thing together.

Parameters:
connection - the instanatiating connection
sqlStatement - the SQL statement with ? for IN markers
Throws:
java.sql.SQLException - if something bad occurs
Method Detail

close

public void close()
           throws java.sql.SQLException
Release objects for garbage collection and call Statement.close().

Specified by:
close in interface java.sql.Statement
Overrides:
close in class Statement
Throws:
java.sql.SQLException - if an error occurs

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
A Prepared SQL query is executed and its ResultSet is returned.

Specified by:
executeQuery in interface java.sql.PreparedStatement
Returns:
a ResultSet that contains the data produced by the * query - never null.
Throws:
java.sql.SQLException - if a database access error occurs

executeUpdate

public int executeUpdate()
                  throws java.sql.SQLException
Execute a SQL INSERT, UPDATE or DELETE statement. In addition, SQL statements that return nothing such as SQL DDL statements can be executed.

Specified by:
executeUpdate in interface java.sql.PreparedStatement
Returns:
either the row count for INSERT, UPDATE or DELETE; or 0 for SQL statements that return nothing.
Throws:
java.sql.SQLException - if a database access error occurs

compileQuery

protected java.lang.String compileQuery()
                                 throws java.sql.SQLException
Helper - this compiles the SQL query from the various parameters This is identical to toString() except it throws an exception if a parameter is unused.

Returns:
the compiled query
Throws:
java.sql.SQLException - if an error occurs

setNull

public void setNull(int parameterIndex,
                    int sqlType)
             throws java.sql.SQLException
Sets a parameter to SQL NULL.

Note: you must specify the parameters SQL type (although PostgreSQL ignores it)

Specified by:
setNull in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1, etc...
sqlType - the SQL type code defined in java.sql.Types
Throws:
java.sql.SQLException - if a database access error occurs

setBoolean

public void setBoolean(int parameterIndex,
                       boolean x)
                throws java.sql.SQLException
Sets a parameter to a Java boolean value. The driver converts this to a SQL BIT value when it sends it to the database.

Specified by:
setBoolean in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setByte

public void setByte(int parameterIndex,
                    byte x)
             throws java.sql.SQLException
Sets a parameter to a Java byte value. The driver converts this to a SQL TINYINT value when it sends it to the database.

Specified by:
setByte in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setShort

public void setShort(int parameterIndex,
                     short x)
              throws java.sql.SQLException
Sets a parameter to a Java short value. The driver converts this to a SQL SMALLINT value when it sends it to the database.

Specified by:
setShort in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setInt

public void setInt(int parameterIndex,
                   int x)
            throws java.sql.SQLException
Sets a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database.

Specified by:
setInt in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setLong

public void setLong(int parameterIndex,
                    long x)
             throws java.sql.SQLException
Sets a parameter to a Java long value. The driver converts this to a SQL BIGINT value when it sends it to the database.

Specified by:
setLong in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setFloat

public void setFloat(int parameterIndex,
                     float x)
              throws java.sql.SQLException
Sets a parameter to a Java float value. The driver converts this to a SQL FLOAT value when it sends it to the database.

Specified by:
setFloat in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setDouble

public void setDouble(int parameterIndex,
                      double x)
               throws java.sql.SQLException
Sets a parameter to a Java double value. The driver converts this to a SQL DOUBLE value when it sends it to the database.

Specified by:
setDouble in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBigDecimal

public void setBigDecimal(int parameterIndex,
                          java.math.BigDecimal x)
                   throws java.sql.SQLException
Sets a parameter to a java.lang.BigDecimal value. The driver converts this to a SQL NUMERIC value when it sends it to the database.

Specified by:
setBigDecimal in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBlob

public void setBlob(int parameterIndex,
                    java.sql.Blob x)
             throws java.sql.SQLException
Sets a parameter to a java.sql.Blob value.

Specified by:
setBlob in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setString

public void setString(int parameterIndex,
                      java.lang.String x)
               throws java.sql.SQLException
Sets 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.

Specified by:
setString in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setBytes

public void setBytes(int parameterIndex,
                     byte[] x)
              throws java.sql.SQLException
Sets 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.

Implementation note: with org.postgresql, this creates a large object, and stores the objects oid in this column.

Specified by:
setBytes in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setDate

public void setDate(int parameterIndex,
                    java.sql.Date x)
             throws java.sql.SQLException
Sets a parameter to a java.sql.Date value. The driver converts this to a SQL DATE value when it sends it to the database.

Specified by:
setDate in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setTime

public void setTime(int parameterIndex,
                    java.sql.Time x)
             throws java.sql.SQLException
Sets a parameter to a java.sql.Time value. The driver converts this to a SQL TIME value when it sends it to the database.

Specified by:
setTime in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...));
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setTimestamp

public void setTimestamp(int parameterIndex,
                         java.sql.Timestamp x)
                  throws java.sql.SQLException
Sets a parameter to a java.sql.Timestamp value. The driver converts this to a SQL TIMESTAMP value when it sends it to the database.

Specified by:
setTimestamp in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
Throws:
java.sql.SQLException - if a database access error occurs

setAsciiStream

public void setAsciiStream(int parameterIndex,
                           java.io.InputStream x,
                           int length)
                    throws java.sql.SQLException
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. 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 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.

Specified by:
setAsciiStream in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
length - the number of bytes in the stream
Throws:
java.sql.SQLException - if a database access error occurs

setUnicodeStream

public void setUnicodeStream(int parameterIndex,
                             java.io.InputStream x,
                             int length)
                      throws java.sql.SQLException
Deprecated.  

When a very large Unicode value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.InputStream. 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.

** DEPRECIATED IN JDBC 2 **

Note: this stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Specified by:
setUnicodeStream in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
length - the parameter length
Throws:
java.sql.SQLException - if a database access error occurs

setBinaryStream

public void setBinaryStream(int parameterIndex,
                            java.io.InputStream x,
                            int length)
                     throws java.sql.SQLException
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. JDBC will read the data from the stream as needed, until it reaches end-of-file.

Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.

Specified by:
setBinaryStream in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the parameter value
length - the parameter length
Throws:
java.sql.SQLException - if a database access error occurs

clearParameters

public void clearParameters()
                     throws java.sql.SQLException
In general, parameter values remain in force for repeated used of a Statement. Setting a parameter value automatically clears its previous value. However, in coms cases, it is useful to immediately release the resources used by the current parameter values; this can be done by calling clearParameters().

Specified by:
clearParameters in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if a database access error occurs

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType,
                      int scale)
               throws java.sql.SQLException
Sets the value of a parameter using an object; use the java.lang equivalent objects for integral values.

The given Java object will be converted to the targetSqlType before being sent to the database.

Note that this method may be used to pass database-specific abstract data types. This is done by using a Driver-specific Java type and using a targetSqlType of java.sql.Types.OTHER.

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the object containing the input parameter value
targetSqlType - The SQL type to be send to the database
scale - for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types this is the number of digits after the decimal. For all other types this value will be ignored.
Throws:
java.sql.SQLException - if a database access error occurs

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x,
                      int targetSqlType)
               throws java.sql.SQLException
Specified by:
setObject in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setObject(int, java.lang.Object, int)

setObject

public void setObject(int parameterIndex,
                      java.lang.Object x)
               throws java.sql.SQLException
This stores an Object into a parameter.

Specified by:
setObject in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1...
x - the object to set
Throws:
java.sql.SQLException - if a database access error occurs

execute

public boolean execute()
                throws java.sql.SQLException
Some prepared statements return multiple results; the execute method handles these complex statements as well as the simpler form of statements handled by executeQuery() and executeUpdate().

Specified by:
execute in interface java.sql.PreparedStatement
Returns:
true if the next result is a ResultSet; false if it is an update count or there are no more results
Throws:
java.sql.SQLException - if a database access error occurs

toString

public java.lang.String toString()
Returns the SQL statement with the current template values substituted.

Note:: This is identical to compileQuery() except instead of throwing SQLException if a parameter is null, it places ? instead.

Returns:
the SQL statement

addBatch

public void addBatch()
              throws java.sql.SQLException
This parses the query and adds it to the current batch

Specified by:
addBatch in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException - if an error occurs

getMetaData

public java.sql.ResultSetMetaData getMetaData()
                                       throws java.sql.SQLException
Returns the MetaData for the last ResultSet returned.

Specified by:
getMetaData in interface java.sql.PreparedStatement
Returns:
The ResultSet Metadata
Throws:
java.sql.SQLException - if an error occurs

setArray

public void setArray(int i,
                     java.sql.Array x)
              throws java.sql.SQLException
Specified by:
setArray in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setArray(int, java.sql.Array)

setBlob

public void setBlob(int i,
                    Blob x)
             throws java.sql.SQLException
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setBlob(int, java.sql.Blob)

setCharacterStream

public void setCharacterStream(int i,
                               java.io.Reader x,
                               int length)
                        throws java.sql.SQLException
Specified by:
setCharacterStream in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setCharacterStream(int, java.io.Reader, int)

setClob

public void setClob(int i,
                    java.sql.Clob x)
             throws java.sql.SQLException
Specified by:
setClob in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setClob(int, java.sql.Clob)

setNull

public void setNull(int i,
                    int t,
                    java.lang.String s)
             throws java.sql.SQLException
Specified by:
setNull in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setNull(int, int, java.lang.String)

setRef

public void setRef(int i,
                   java.sql.Ref x)
            throws java.sql.SQLException
Specified by:
setRef in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setRef(int, java.sql.Ref)

setDate

public void setDate(int i,
                    java.sql.Date d,
                    java.util.Calendar cal)
             throws java.sql.SQLException
Specified by:
setDate in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setDate(int, java.sql.Date, java.util.Calendar)

setTime

public void setTime(int i,
                    java.sql.Time t,
                    java.util.Calendar cal)
             throws java.sql.SQLException
Specified by:
setTime in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setTime(int, java.sql.Time, java.util.Calendar)

setTimestamp

public void setTimestamp(int i,
                         java.sql.Timestamp t,
                         java.util.Calendar cal)
                  throws java.sql.SQLException
Specified by:
setTimestamp in interface java.sql.PreparedStatement
Throws:
java.sql.SQLException
See Also:
PreparedStatement.setTimestamp(int, java.sql.Timestamp, java.util.Calendar)

setURL

public void setURL(int parameterIndex,
                   java.net.URL x)
            throws java.sql.SQLException
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.

Specified by:
setURL in interface java.sql.PreparedStatement
Parameters:
parameterIndex - the first parameter is 1, the second is 2, ...
x - the java.net.URL object to be set
Throws:
java.sql.SQLException - if a database access error occurs
Since:
JDK 1.4

getParameterMetaData

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

Specified by:
getParameterMetaData in interface java.sql.PreparedStatement
Returns:
a ParameterMetaData object that contains information about the number, types and properties of this PreparedStatement object's parameters
Throws:
java.sql.SQLException - if a database access error occurs
Since:
JDK 1.4
See Also:
ParameterMetaData

set

private void set(int paramIndex,
                 java.lang.String s)
          throws java.sql.SQLException
There are a lot of setXXX classes which all basically do the same thing. We need a method which actually does the set for us.

Parameters:
paramIndex - the index into the inString
s - a string to be stored
Throws:
java.sql.SQLException - if something goes wrong

setGeneratedKeysFlag

protected void setGeneratedKeysFlag(int autoGeneratedKeys)
Set the auto generated key flag defined in Statement

Parameters:
autoGeneratedKeys - usually Statement.RETURN_GENERATED_KEYS
See Also:
Connection.prepareStatement(String, int)


Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.