@Override
  public int[] executeBatch() throws SQLException {
    checkClose();
    int queryParameterSize = queryParameters.size();
    if (queryParameterSize == 0) {
      return new int[0];
    }
    executeBatchInternal(queryParameterSize);
    return results.getCmdInformation().getUpdateCounts();
  }
@ Override public int [ ] executeBatch ( ) throws SQLException { checkClose ( ) ; int queryParameterSize = queryParameters . size ( ) ; if ( queryParameterSize == 0 ) { return new int [ 0 ] ; } executeBatchInternal ( queryParameterSize ) ; return results . getCmdInformation ( ) . getUpdateCounts ( ) ; }
<p>Submits a batch of send to the database for execution and if all send execute successfully,
returns an array of update counts. The <code>int</code> elements of the array that is returned
are ordered to correspond to the send in the batch, which are ordered according to the order in
which they were added to the batch. The elements in the array returned by the method
<code>executeBatch</code> may be one of the following:</p>
<ol><li>A number greater than or equal to zero -- indicates that the command was processed
successfully and is an update count giving the number of rows in the database that were
affected by the command's execution
<li>A value of <code>SUCCESS_NO_INFO</code> -- indicates that the command was processed
successfully but that the number of rows affected is unknown. If one of the send in a batch
update fails to execute properly, this method throws a
<code>BatchUpdateException</code>, and a JDBC driver may or may not continue to process the
remaining send in the batch.  However, the driver's behavior must be consistent with a
particular DBMS, either always continuing to process send or never continuing to process send.
If the driver continues processing after a failure, the array returned by the method
<code>BatchUpdateException.getUpdateCounts</code> will contain as many elements as there are
send in the batch, and at least one of the elements will be the following:
<li>A value of <code>EXECUTE_FAILED</code> -- indicates that the command failed to execute
successfully and occurs only if a driver continues to process send after a command fails </ol>
<p>The possible implementations and return values have been modified in the Java 2 SDK,
Standard Edition, version 1.3 to accommodate the option of continuing to proccess send in a
batch update after a
<code>BatchUpdateException</code> object has been thrown.</p>

@return an array of update counts containing one element for each command in the batch.  The
elements of the array are ordered according to the order in which send were added to the
batch.
@throws SQLException if a database access error occurs, this method is called on a closed
<code>Statement</code> or the driver does not support batch statements.
Throws {@link BatchUpdateException} (a subclass of
<code>SQLException</code>) if one of the send sent to the database fails
to execute properly or attempts to return a result set.
@see #addBatch
@see DatabaseMetaData#supportsBatchUpdates
@since 1.3