DictionaryHierarchy

This analysis hierarchy creates a single-level hierarchy with the members filled by a dictionary attached to a store column. For instance, it can be set up like this:

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

//...

hierarchyBuilder.toDimension(MY_DIMENSION,
        DictionaryHierarchy.hierarchy(MY_HIERARCHY)
            .withLevel(MY_LEVEL)
            .withDictionary(STORE_NAME, FieldPath.of(Constants.AS_OF_DATE))
            .withComparator(ReverseCustomComparator.PLUGIN_KEY)
            .withLevelClass(LocalDate.class)
            .withAllMembersEnabled(false));

Here are the methods exposed to set up the hierarchy:

Method Parameters Mandatory Usage
withAllMembersEnabled Boolean Specifies if the level 0 is the AllMembers level. Set to false makes the dimension slicing.
slicing Makes the hierarchy slicing, equivalent to withAllMembersEnabled(false).
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 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.
withDictionary String, FieldPath X Defines the dictionary used to fill the members of the level.
withLevelClass Class Sets a class to filter out all dictionary members that don’t belong to.