code: public int executeBatchUpdateSql(String sql, List<PropertyDesc[]> propDescsList, Object[] entities) {
          PreparedStatement stmt = null;
          ResultSet rs = null;
          try {
              Connection conn = connectionProvider.getConnection();
  
              if (logger.isDebugEnabled()) {
                  printSql(sql);
                  for(int i=0; i < propDescsList.size(); i++){
                      PropertyDesc[] propDescs = propDescsList.get(i);
                      logger.debug("[" + i + "]");
                      printParameters(propDescs, entities[i]);
                  }
              }
  
              if(entities != null && dialect.supportsGenerationType(GenerationType.IDENTITY)){
                  stmt = conn.prepareStatement(sql, PreparedStatement.RETURN_GENERATED_KEYS);
              } else {
                  stmt = conn.prepareStatement(sql);
              }
  
              if(entities != null) {
                  for (int i = 0; i < propDescsList.size(); i++) {
                      PropertyDesc[] propDescs = propDescsList.get(i);
                      setParameters(stmt, propDescs, entities[i]);
                      stmt.addBatch();
                  }
              } else {
                  for(PropertyDesc[] propDescs: propDescsList){
                      setParameters(stmt, propDescs, null);
                      stmt.addBatch();
                  }
              }
  
              int[] results = stmt.executeBatch();
  
              int updateRows = 0;
              for(int result: results){
                  updateRows += result;
              }
  
              // Sets GenerationType.IDENTITY properties value.
              if(entities != null && dialect.supportsGenerationType(GenerationType.IDENTITY)){
                  rs = stmt.getGeneratedKeys();
                  for(Object entity: entities){
                      fillIdentityPrimaryKeys(entity, rs);
                  }
              }
  
              return updateRows;
  
          } catch(SQLException ex){
              throw new SQLRuntimeException(ex);
          } finally {
              JdbcUtil.close(rs);
              JdbcUtil.close(stmt);
          }
      }
docs: Executes the update SQL.
  
  @param sql the update SQL to execute
  @param propDescsList the list of parameter arrays.
  @param entities the entities object in insertion, otherwise null
  
  @return the number of updated rows
  
  @throws SQLRuntimeException if a database access error occurs