MdmLevelHierarchy mdmCustDefLvlHier = (MdmLevelHierarchy)
mdmCustDim.getDefaultHierarchy();
// Get the Source objects for the hierarchies.
StringSource prodHier = (StringSource) mdmProdDefLvlHier.getSource();
StringSource timeHier = (StringSource) mdmTimeDefLvlHier.getSource();
StringSource chanHier = (StringSource) mdmChanDefLvlHier.getSource();
StringSource custHier = (StringSource) mdmCustDefLvlHier.getSource();
// Get the DataProvider.
ExpressDataProvider dp = getExpressDataProvider();
// Get the short description attribute for the dimensions and the
// Source objects for the attributes.
MdmAttribute mdmProdShortDescr =
mdmProdDim.getShortValueDescriptionAttribute();
Source prodShortDescr = mdmProdShortDescr.getSource();
MdmAttribute mdmCustShortDescr =
mdmCustDim.getShortValueDescriptionAttribute();
Source custShortDescr = mdmCustShortDescr.getSource();
MdmAttribute mdmTimeShortDescr =
mdmTimeDim.getShortValueDescriptionAttribute();
Source timeShortDescr = mdmTimeShortDescr.getSource();
// Get the short description attribute for the channel dimension.
MdmAttribute mdmChanShortDescr =
mdmChanDim.getShortValueDescriptionAttribute();
Source chanShortDescr = mdmChanShortDescr.getSource();
// Create Parameter objects with values from the CUSTOMER_AW and
// PRODUCT_AW dimensions.
StringParameter custParam =
new StringParameter(dp, "SHIPMENTS_AW::REGION_AW::9");
StringParameter prodParam =
new StringParameter(dp, "PRODUCT_PRIMARY_AW::FAMILY_AW::4");
// Create parameterized Source objects for the default hierarchies of
// the CUSTOMER_AW and PRODUCT_AW dimensions.
StringSource custParamSrc = dp.createParameterizedSource(custParam);
StringSource prodParamSrc = dp.createParameterizedSource(prodParam);
// Create derived Source objects from the hierarchies, using the
// parameterized Source objects as the comparison Source objects.
Source paramCustSel = custHier.join(custHier.value(), custParamSrc);
Source paramProdSel = prodHier.join(prodHier.value(), prodParamSrc);