HierarchyWithExtraStoreFields
This creates a fact hierarchy with a single level that contains additional members coming from several side stores.
import com.activeviam.accelerator.common.hierarchy.HierarchyWithExtraStoreFields;
// ....
hierarchyBuilder.toDimension(RISK_DIMENSION,
HierarchyWithExtraStoreFields.hierarchy(RISK_FACTORS_HIERARCHY)
.withLevel(RISK_FACTOR_LEVEL)
.withSelectionField(RISK_FACTOR_ID)
.withExtraStoreField(StoreConstants.FX_RATE_STORE_NAME, FieldPath.of(StoreFieldConstants.RISK_FACTOR_ID))
.withExtraStoreField(StoreConstants.FX_RATE_STORE_NAME, FieldPath.of(StoreFieldConstants.COUNTER_CCY))
.withComparator(new ComparatorDescription(NaturalOrderComparator.type)));
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. | |
withSelectionField | String | The name of the field linked to the level in the selection, by default it is set to the level name. | |
withExtraStoreField | String, FieldPath | Fills the level members with an extra store column. |