code: protected void executeBatchAndClose(PreparedStatement... preparedStatements)
              throws SQLException {
          for (PreparedStatement ps : preparedStatements) {
              ps.executeBatch();
              ps.clearBatch();
              ps.close();
          }
      }
docs: Helper function to execute all pending patch operations in the given
  {@link PreparedStatement}s and close it.
  
  @param preparedStatements
  @throws SQLException