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

org.vertexium.query.TermsAggregation Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.query;

import java.util.ArrayList;
import java.util.List;

public class TermsAggregation extends Aggregation implements SupportsNestedAggregationsAggregation {
    private final String aggregationName;
    private final String propertyName;
    private final List nestedAggregations = new ArrayList<>();
    private Integer size;
    private boolean includeHasNotCount;

    public TermsAggregation(String aggregationName, String propertyName) {
        this.aggregationName = aggregationName;
        this.propertyName = propertyName;
    }

    public String getAggregationName() {
        return aggregationName;
    }

    public String getPropertyName() {
        return propertyName;
    }

    @Override
    public void addNestedAggregation(Aggregation nestedAggregation) {
        this.nestedAggregations.add(nestedAggregation);
    }

    @Override
    public Iterable getNestedAggregations() {
        return nestedAggregations;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public boolean isIncludeHasNotCount() {
        return includeHasNotCount;
    }

    /**
     * Setting this parameter to true will cause the aggregation to compute
     * the number of elements that do not have a value for the property
     * being aggregated on.
     */
    public void setIncludeHasNotCount(boolean includeHasNotCount) {
        this.includeHasNotCount = includeHasNotCount;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy