All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.noenv.wiremongo.command.index.CreateIndexesCommand Maven / Gradle / Ivy

There is a newer version: 4.5.11
Show newest version
package com.noenv.wiremongo.command.index;

import com.noenv.wiremongo.command.collection.WithCollectionCommand;
import io.vertx.ext.mongo.IndexModel;

import java.util.List;
import java.util.stream.Collectors;

public class CreateIndexesCommand extends WithCollectionCommand {

  private final List indexModels;

  public CreateIndexesCommand(String collection, List indexModels) {
    this("createIndexes", collection, indexModels);
  }

  public CreateIndexesCommand(String method, String collection, List indexModels) {
    super(method, collection);
    this.indexModels = indexModels;
  }

  public List getIndexModels() {
    return indexModels;
  }

  @Override
  public String toString() {
    return super.toString() + ", indexModels: " + (indexModels == null ? "null" : indexModels.stream()
      .map(IndexModel::toString).collect(Collectors.joining(",")));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy