DateSlicerHierarchy

The DateSlicer hierarchy is part of the date shifting feature. This hierarchy is slicing. It is used to populate a level with a set of possible target date for the UnfilteredDateShiftPostProcessor.

import com.activeviam.accelerator.common.hierarchy.DateSlicerHierarchy;

// ....

hierarchyBuilder.toDimension(DATES_DIMENSION,
        DateSlicerHierarchy.hierarchy(DATE_DTD_HIERARCHY)
            .withLevel(DATE_DTD_HIERARCHY)
            .withDateField(baseStore, FieldPath.of(AS_OF_DATE))
            .withSpecificDates("Yesterday=DAY-1,Tomorrow=DAY+1,End Of Month=EOM-1,End Of Quarter=EOQ-1,End Of Year=EOY-1"));

There are the methods exposed to set up the hierarchy:

Method Parameters Mandatory Usage
withVisible Boolean Sets the visible flag to the hierarchy.
hidden Hides the hierarchy, equivalent to withVisible(false)
withLevel String X Specifies the name of the required level.
withType int The Copper type of the level (mandatory for a Copper usage), for instance withType(Types.TYPE_STRING).
withComparator IComparator Sets the level comparator directly from a comparator object instance (the running hierarchy will create its own instance).
withComparator IComparatorDescription Sets the level comparator from a comparator description.
withComparator String Sets the level comparator from a comparator Plug-In Key.
withDateFieldFromSelection String Will add to the members the content of the provided field coming from the selection (this method is unsafe).
withDateField String, FieldPath Will add to the members the content of the field column of the specified store.
withSpecificDates String A list of specific date definition added to the members, with the format UserValue=TechnicalValue. The user value is displayed.