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

br.com.anteros.nosql.persistence.mongodb.session.InsertOptions Maven / Gradle / Ivy

There is a newer version: 1.0.6
Show newest version
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