// Get the Source for the measure.
Source units = mdmUnits.getSource();
// Get the MdmPrimaryDimension objects for the dimensions of the measure.
MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
// Get the default hierarchy of the Product dimension.
MdmHierarchy mdmProdHier = mdmProdDim.getDefaultHierarchy();
// Get the StringSource for the hierarchy.