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

com.noenv.wiremongo.command.find.FindOneAndUpdateWithOptionsCommand Maven / Gradle / Ivy

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

import io.vertx.core.json.JsonObject;
import io.vertx.ext.mongo.FindOptions;
import io.vertx.ext.mongo.UpdateOptions;

@SuppressWarnings("squid:MaximumInheritanceDepth")
public class FindOneAndUpdateWithOptionsCommand extends FindOneAndUpdateBaseCommand {

  private final FindOptions findOptions;
  private final UpdateOptions updateOptions;

  public FindOneAndUpdateWithOptionsCommand(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions) {
    super("findOneAndUpdateWithOptions", collection, query, update);
    this.findOptions = findOptions;
    this.updateOptions = updateOptions;
  }

  public FindOptions getFindOptions() {
    return findOptions;
  }

  public UpdateOptions getUpdateOptions() {
    return updateOptions;
  }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy