code: public PreparedStatement prepareStatement(final String sql, final int autoGeneratedKeys)
        throws SQLException {
      return internalPrepareStatement(sql,
          ResultSet.TYPE_FORWARD_ONLY,
          ResultSet.CONCUR_READ_ONLY,
          autoGeneratedKeys);
    }
docs: <p>Creates a default <code>PreparedStatement</code> object that has the capability to retrieve
  auto-generated keys. The given constant tells the driver whether it should make auto-generated
  keys available for retrieval.  This parameter is ignored if the SQL statement is not an
  <code>INSERT</code> statement, or an SQL statement able to return auto-generated keys (the
  list of such statements is vendor-specific).</p>
  <p><B>Note:</B> This method is optimized for handling parametric SQL statements that benefit
  from precompilation. If the driver supports precompilation, the method
  <code>prepareStatement</code> will send the statement to the database for precompilation. Some
  drivers may not support precompilation. In this case, the statement may not be sent to the
  database until the <code>PreparedStatement</code> object is executed.  This has no direct
  effect on users; however, it does affect which methods throw certain SQLExceptions.</p>
  <p>Result sets created using the returned <code>PreparedStatement</code> object will by
  default be type <code>TYPE_FORWARD_ONLY</code> and have a concurrency level of
  <code>CONCUR_READ_ONLY</code>. The holdability of the created result sets can be determined by
  calling {@link #getHoldability}.</p>
  
  @param sql               an SQL statement that may contain one or more '?' IN parameter
  placeholders
  @param autoGeneratedKeys a flag indicating whether auto-generated keys should be returned; one
  of
  <code>Statement.RETURN_GENERATED_KEYS</code>
  or <code>Statement.NO_GENERATED_KEYS</code>
  @return a new <code>PreparedStatement</code> object, containing the pre-compiled SQL statement,
  that will have the capability of returning auto-generated keys
  @throws SQLException                    if a database access error occurs, this method is
  called on a closed connection or the given parameter is
  not a <code>Statement</code> constant indicating
  whether auto-generated keys should be returned