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

org.hisp.dhis.query.analytics.AnalyticsQuery Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package org.hisp.dhis.query.analytics;

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

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import org.hisp.dhis.model.AggregationType;
import org.hisp.dhis.model.IdScheme;

@Getter
@Setter
@Accessors( chain = true )
public class AnalyticsQuery
{
    private final List dimensions = new ArrayList<>();

    private final List filters = new ArrayList<>();

    private AggregationType aggregationType;

    private String startDate;

    private String endDate;

    private Boolean skipMeta;

    private Boolean skipData;

    private Boolean skipRounding;

    private Boolean ignoreLimit;

    private IdScheme outputIdScheme;

    private IdScheme inputIdScheme;

    private AnalyticsQuery()
    {
    }

    public static AnalyticsQuery instance()
    {
        return new AnalyticsQuery();
    }

    public AnalyticsQuery addDimension( Dimension dimension )
    {
        this.dimensions.add( dimension );
        return this;
    }

    public AnalyticsQuery addDimension( String dimension, List items )
    {
        return addDimension( new Dimension( dimension, items ) );
    }

    public AnalyticsQuery addFilter( Dimension filter )
    {
        this.filters.add( filter );
        return this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy