br.com.anteros.nosql.persistence.mongodb.session.InsertOptions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Anteros-NoSql-Persistence-MongoDB Show documentation
Show all versions of Anteros-NoSql-Persistence-MongoDB Show documentation
Anteros NoSQL Persistence MongoDB.
package br.com.anteros.nosql.persistence.mongodb.session;
import com.mongodb.WriteConcern;
public class InsertOptions {
private com.mongodb.InsertOptions options = new com.mongodb.InsertOptions();
public InsertOptions copy() {
return new InsertOptions()
.bypassDocumentValidation(getBypassDocumentValidation())
.continueOnError(isContinueOnError())
.writeConcern(getWriteConcern());
}
public com.mongodb.InsertOptions getOptions() {
return options;
}
public InsertOptions writeConcern(final WriteConcern writeConcern) {
options.writeConcern(writeConcern);
return this;
}
public InsertOptions continueOnError(final boolean continueOnError) {
options.continueOnError(continueOnError);
return this;
}
public WriteConcern getWriteConcern() {
return options.getWriteConcern();
}
public boolean isContinueOnError() {
return options.isContinueOnError();
}
public Boolean getBypassDocumentValidation() {
return options.getBypassDocumentValidation();
}
public InsertOptions bypassDocumentValidation(final Boolean bypassDocumentValidation) {
options.bypassDocumentValidation(bypassDocumentValidation);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy