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

com.noenv.wiremongo.command.distinct.DistinctWithQueryCommand Maven / Gradle / Ivy

There is a newer version: 4.5.10
Show newest version
package com.noenv.wiremongo.command.distinct;

import com.noenv.wiremongo.command.WithQueryCommand;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.mongo.DistinctOptions;

public class DistinctWithQueryCommand extends WithQueryCommand {

  private final String fieldName;
  private final String resultClassname;
  private final DistinctOptions options;

  public DistinctWithQueryCommand(String collection, String fieldName, String resultClassname, JsonObject query) {
    this(collection, fieldName, resultClassname, query, null);
  }

  public DistinctWithQueryCommand(String collection, String fieldName, String resultClassname, JsonObject query, DistinctOptions options) {
    super("distinctWithQuery", collection, query);
    this.fieldName = fieldName;
    this.resultClassname = resultClassname;
    this.options = options;
  }

  public String getFieldName() {
    return fieldName;
  }

  public String getResultClassname() {
    return resultClassname;
  }

  public DistinctOptions getOptions() {
    return options;
  }

  @Override
  public String toString() {
    return super.toString() + ", fieldName: " + fieldName + ", resultClassname: " + resultClassname + ", options: " + (options != null ? options.toJson().encode() : "null");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy