br.com.anteros.nosql.persistence.mongodb.session.DeleteOptions 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;
import com.mongodb.client.model.Collation;
import com.mongodb.client.model.DBCollectionRemoveOptions;
public final class DeleteOptions {
private final DBCollectionRemoveOptions options = new DBCollectionRemoveOptions();
public DeleteOptions copy() {
DeleteOptions deleteOptions = new DeleteOptions()
.writeConcern(getWriteConcern());
if (getCollation() != null) {
deleteOptions.collation(Collation.builder(getCollation()).build());
}
return deleteOptions;
}
public Collation getCollation() {
return options.getCollation();
}
public DeleteOptions collation(final Collation collation) {
options.collation(collation);
return this;
}
public WriteConcern getWriteConcern() {
return options.getWriteConcern();
}
public DeleteOptions writeConcern(final WriteConcern writeConcern) {
options.writeConcern(writeConcern);
return this;
}
public DBCollectionRemoveOptions getOptions() {
return options;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy