println("Selecting a Range With NumberParameter Objects");
// Get the MdmMeasure for units sold.
MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
// Get the Source for the measure.
Source units = mdmUnits.getSource();
// Get the dimensions of the measure and the default hierarchies of
// the dimensions.
MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
MdmLevelHierarchy mdmProdDefLvlHier = (MdmLevelHierarchy)
mdmProdDim.getDefaultHierarchy();
MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
MdmLevelHierarchy mdmTimeDefLvlHier = (MdmLevelHierarchy)
mdmTimeDim.getDefaultHierarchy();
MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
MdmLevelHierarchy mdmChanDefLvlHier = (MdmLevelHierarchy)
mdmChanDim.getDefaultHierarchy();
MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
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 shipHier = (StringSource) mdmCustDefLvlHier.getSource();
// Get the DataProvider.
ExpressDataProvider dp = getExpressDataProvider();
// Create NumberParameter objects for the starting and ending values
// of the range.
NumberParameter startParam = new NumberParameter(dp, 1);
NumberParameter endParam = new NumberParameter(dp, 6);
// Create parameterized Source objects.
NumberSource startParamSrc = dp.createParameterizedSource(startParam);
NumberSource endParamSrc = dp.createParameterizedSource(endParam);
// Specify a set of positions of the products dimension using the
// parameterized Source objects.
Source paramProdSelInterval = prodHier.interval(startParamSrc,
endParamSrc);
// Get the short description attribute for the Product dimension and
// get the Source for the attribute.
MdmAttribute mdmProdShortDescr =
mdmProdDim.getShortValueDescriptionAttribute();
Source prodShortDescr = mdmProdShortDescr.getSource();
// Join the selected products to the short descriptions.
Source paramProdSelIntervalShortDescr =
prodShortDescr.join(paramProdSelInterval);
// Join units to selected values from three of the dimensions.
// These join shortcuts hide the output.
// Join the parameterized Source, also.