Search in sources :

Example 1 with RollupKind

use of com.khartec.waltz.model.entity_statistic.RollupKind in project waltz by khartec.

the class EntityStatisticEndpoint method calculateHistoricStatTallyRoute.

private List<TallyPack<String>> calculateHistoricStatTallyRoute(Request request, Response response) throws IOException {
    IdSelectionOptions idSelectionOptions = readIdSelectionOptionsFromBody(request);
    RollupKind rollupKind = extractRollupKind(request);
    Duration duration = EnumUtilities.readEnum(request.queryParams("duration"), Duration.class, s -> Duration.MONTH);
    Long statisticId = getId(request);
    return entityStatisticService.calculateHistoricStatTally(statisticId, rollupKind, idSelectionOptions, duration);
}
Also used : Duration(com.khartec.waltz.model.Duration) RollupKind(com.khartec.waltz.model.entity_statistic.RollupKind) IdSelectionOptions(com.khartec.waltz.model.IdSelectionOptions)

Example 2 with RollupKind

use of com.khartec.waltz.model.entity_statistic.RollupKind in project waltz by khartec.

the class EntityStatisticEndpoint method calculateStatTallyRoute.

private TallyPack<String> calculateStatTallyRoute(Request request, Response response) throws IOException {
    IdSelectionOptions idSelectionOptions = readIdSelectionOptionsFromBody(request);
    RollupKind rollupKind = extractRollupKind(request);
    Long statisticId = getId(request);
    return entityStatisticService.calculateStatTally(statisticId, rollupKind, idSelectionOptions);
}
Also used : RollupKind(com.khartec.waltz.model.entity_statistic.RollupKind) IdSelectionOptions(com.khartec.waltz.model.IdSelectionOptions)

Aggregations

IdSelectionOptions (com.khartec.waltz.model.IdSelectionOptions)2 RollupKind (com.khartec.waltz.model.entity_statistic.RollupKind)2 Duration (com.khartec.waltz.model.Duration)1