code: public void addBatch() throws SQLException {
      ParameterHolder[] holder = new ParameterHolder[prepareResult.getParamCount()];
      for (int i = 0; i < holder.length; i++) {
        holder[i] = parameters[i];
        if (holder[i] == null) {
          logger.error("You need to set exactly " + prepareResult.getParamCount()
              + " parameters on the prepared statement");
          throw ExceptionMapper
              .getSqlException("You need to set exactly " + prepareResult.getParamCount()
                  + " parameters on the prepared statement");
        }
      }
      parameterList.add(holder);
    }
docs: Adds a set of parameters to this <code>PreparedStatement</code> object's batch of send.
  <br>
  <br>
  
  @throws SQLException if a database access error occurs or this method is called on a closed
  <code>PreparedStatement</code>
  @see Statement#addBatch
  @since 1.2