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

com.noenv.wiremongo.mapping.find.FindOneAndReplaceBase Maven / Gradle / Ivy

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

import com.noenv.wiremongo.command.find.FindOneAndReplaceBaseCommand;
import com.noenv.wiremongo.mapping.replace.WithReplace;
import io.vertx.core.json.JsonObject;

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

  public FindOneAndReplaceBase() {
    this("findOneAndReplace");
  }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy