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

com.noenv.wiremongo.mapping.replace.ReplaceDocumentsBase Maven / Gradle / Ivy

There is a newer version: 4.5.10
Show newest version
package com.noenv.wiremongo.mapping.replace;

import com.noenv.wiremongo.command.replace.ReplaceDocumentsBaseCommand;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.mongo.MongoClientUpdateResult;

@SuppressWarnings("squid:MaximumInheritanceDepth")
public abstract class ReplaceDocumentsBase> extends WithReplace {

  public ReplaceDocumentsBase() {
    this("replaceDocuments");
  }

  public ReplaceDocumentsBase(String method) {
    super(method);
  }

  public ReplaceDocumentsBase(JsonObject json) {
    super(json);
  }

  @Override
  public C returns(final MongoClientUpdateResult response) {
    return stub(c -> null == response ? null : new MongoClientUpdateResult(response.toJson().copy()));
  }

  @Override
  protected MongoClientUpdateResult parseResponse(Object jsonValue) {
    return new MongoClientUpdateResult((JsonObject) jsonValue);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy