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

com.anwen.mongo.enums.AggregateOptionsEnum Maven / Gradle / Ivy

There is a newer version: 2.1.5
Show newest version
package com.anwen.mongo.enums;

import java.util.Objects;

/**
 * @author JiaChaoYang
 **/
public enum AggregateOptionsEnum {

    ALLOW_DISK_USE("allowDiskUse"),

    BATCH_SIZE("batchSize"),

    COLLATION("collation"),

    MAX_TIME_MS("maxTimeMS"),

    MAX_AWAIT_TIME_MS("maxAwaitTimeMS"),

    BYPASS_DOCUMENT_VALIDATION("bypassDocumentValidation"),

    COMMENT("comment"),

    COMMENT_STR("comment_str"),

    HINT("hint"),

    HINT_STR("hint"),

    LET("let"),

    ;

    private final String options;

    public String getOptions() {
        return options;
    }

    AggregateOptionsEnum(String options) {
        this.options = options;
    }

    public static AggregateOptionsEnum getByOptions(String options){
        for(AggregateOptionsEnum aggregateOptionsEnum:values()) {
            if(Objects.equals(aggregateOptionsEnum.options, options)) {
                return aggregateOptionsEnum;
            }
        }
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy