vertx/src/main/java/eu/internetofus/common/vertx/Repository.java
/**
   * Update all the document of a collection.
   *
   * @param collectionName name of the collection to update.
   * @param query          to the documents to update.
   * @param update         query that specify how to update the documents.
   *
   * @return a future that inform if the documents of the collections are updated
   *         or not.
   *
   */
Update all the document of a collection.
@param collectionName name of the collection to update.
@param query          to the documents to update.
@param update         query that specify how to update the documents.

@return a future that inform if the documents of the collections are updated
or not.
Update all the document of a collection . @param collectionName name of the collection to update . @param query to the documents to update . @param update query that specify how to update the documents . @return a future that inform if the documents of the collections are updated or not .
protected Future<Void> updateCollection(final String collectionName, final JsonObject query,
      final JsonObject update) {
    final Promise<Void> promise = Promise.promise();
    final var options = new UpdateOptions();
    options.setMulti(true);
    this.pool.updateCollectionWithOptions(collectionName, query, update, options, updated -> {
      if (updated.failed()) {
        final var cause = updated.cause();
        Logger.error(cause, "Cannot update the documents on '{}' to have the schema version '{}'.", collectionName,
            this.schemaVersion);
        promise.fail(cause);
      } else {
        Logger.trace("Updated {} documents on '{}' to have the schema version '{}'.",
            () -> updated.result().getDocModified(), () -> collectionName, () -> this.schemaVersion);
        promise.complete();
      }
    });
    return promise.future();
  }
protected Future < Void > updateCollection ( final String collectionName , final JsonObject query , final JsonObject update ) { final Promise < Void > promise = Promise . promise ( ) ; final var options = new UpdateOptions ( ) ; options . setMulti ( true ) ; this . pool . updateCollectionWithOptions ( collectionName , query , update , options , updated -> { if ( updated . failed ( ) ) { final var cause = updated . cause ( ) ; Logger . error ( cause , "Cannot update the documents on '{}' to have the schema version '{}'." , collectionName , this . schemaVersion ) ; promise . fail ( cause ) ; } else { Logger . trace ( "Updated {} documents on '{}' to have the schema version '{}'." , ( ) -> updated . result ( ) . getDocModified ( ) , ( ) -> collectionName , ( ) -> this . schemaVersion ) ; promise . complete ( ) ; } } ) ; return promise . future ( ) ; }
Update all the document of a collection.
Update all the document of a collection .