vertx/src/main/java/eu/internetofus/common/vertx/QueryBuilder.java
/**
   * Add a the restrictions to mark an array field that contains some elements
   * that match a value or a regular expression. It it is a regular expression it
   * has to be between {@code /}.
   *
   * @param fieldName name of the field that contains an array.
   * @param values    or regular expression for the field. If it is {@code null}
   *                  the field is ignored.
   *
   * @return the factory that is using.
   */
Add a the restrictions to mark an array field that contains some elements
that match a value or a regular expression. It it is a regular expression it
has to be between  /.

@param fieldName name of the field that contains an array.
@param values    or regular expression for the field. If it is  null
the field is ignored.

@return the factory that is using.
Add a the restrictions to mark an array field that contains some elements that match a value or a regular expression . It it is a regular expression it has to be between / . @param fieldName name of the field that contains an array . @param values or regular expression for the field . If it is null the field is ignored . @return the factory that is using .
public QueryBuilder withEqOrRegex(final String fieldName, final Iterable<String> values) {
    if (values != null) {
      final var patternsMatch = new JsonArray();
      for (final String value : values) {
        if (value != null) {
          final var elementMatch = this.elementMatch(value);
          patternsMatch.add(new JsonObject().put("$elemMatch", elementMatch));
        }
      }
      if (patternsMatch.size() != 0) {
        this.query.put(fieldName, new JsonObject().put("$all", patternsMatch));
      }
    }
    return this;
  }
public QueryBuilder withEqOrRegex ( final String fieldName , final Iterable < String > values ) { if ( values != null ) { final var patternsMatch = new JsonArray ( ) ; for ( final String value : values ) { if ( value != null ) { final var elementMatch = this . elementMatch ( value ) ; patternsMatch . add ( new JsonObject ( ) . put ( "$elemMatch" , elementMatch ) ) ; } } if ( patternsMatch . size ( ) != 0 ) { this . query . put ( fieldName , new JsonObject ( ) . put ( "$all" , patternsMatch ) ) ; } } return this ; }
Add a the restrictions to mark an array field that contains some elements
 that match a value or a regular expression.
Add a the restrictions to mark an array field that contains some elements that match a value or a regular expression .