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

com.enonic.xp.query.aggregation.NumericRangeAggregationQuery Maven / Gradle / Ivy

The newest version!
package com.enonic.xp.query.aggregation;

import com.google.common.base.MoreObjects;

import com.enonic.xp.annotation.PublicApi;

@PublicApi
public class NumericRangeAggregationQuery
    extends AbstractRangeAggregationQuery
{

    private NumericRangeAggregationQuery( final Builder builder )
    {
        super( builder, builder.ranges );
    }

    @Override
    public String toString()
    {
        return MoreObjects.toStringHelper( this ).
            omitNullValues().
            add( "fieldName", getFieldName() ).
            add( "ranges", getRanges() ).
            toString();
    }

    public static Builder create( final String name )
    {
        return new Builder( name );
    }

    public static class Builder
        extends AbstractRangeAggregationQuery.Builder
    {

        public Builder( final String name )
        {
            super( name );
        }

        public NumericRangeAggregationQuery build()
        {
            return new NumericRangeAggregationQuery( this );
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy