Search in sources :

Example 1 with CountQuery

use of io.gravitee.management.model.analytics.query.CountQuery in project gravitee-management-rest-api by gravitee-io.

the class ApplicationAnalyticsResource method executeCount.

private Analytics executeCount(String application, AnalyticsParam analyticsParam) {
    CountQuery query = new CountQuery();
    query.setFrom(analyticsParam.getFrom());
    query.setTo(analyticsParam.getTo());
    query.setInterval(analyticsParam.getInterval());
    query.setQuery(analyticsParam.getQuery());
    query.setRootField("application");
    query.setRootIdentifier(application);
    return analyticsService.execute(query);
}
Also used : CountQuery(io.gravitee.management.model.analytics.query.CountQuery)

Example 2 with CountQuery

use of io.gravitee.management.model.analytics.query.CountQuery in project gravitee-management-rest-api by gravitee-io.

the class ApiAnalyticsResource method executeCount.

private Analytics executeCount(String api, AnalyticsParam analyticsParam) {
    CountQuery query = new CountQuery();
    query.setFrom(analyticsParam.getFrom());
    query.setTo(analyticsParam.getTo());
    query.setInterval(analyticsParam.getInterval());
    query.setQuery(analyticsParam.getQuery());
    query.setRootField("api");
    query.setRootIdentifier(api);
    return analyticsService.execute(query);
}
Also used : CountQuery(io.gravitee.management.model.analytics.query.CountQuery)

Aggregations

CountQuery (io.gravitee.management.model.analytics.query.CountQuery)2