{
println("\nLiteralQualification Example");
// Get the metadata and source objects for a measure and the dimensions
// of the measure.
MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
Source unitPrice = mdmUnitPrice.getSource();
MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
Source productDim = mdmProdDim.getSource();
MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
mdmProdDim.getDefaultHierarchy();
StringSource prodHier = (StringSource) mdmProdDim.getSource();
MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
MdmLevelHierarchy mdmTimeHier = (MdmLevelHierarchy)
mdmTimeDim.getDefaultHierarchy();
StringSource timeHier = (StringSource) mdmTimeHier.getSource();
// Select one member of each dimension.
Source timeSel = timeHier.selectValue("CALENDAR_YEAR_AW::YEAR_AW::4");
Source prodSel = prodHier.selectValue("PRODUCT_PRIMARY_AW::FAMILY_AW::7");
// Join the dimension selections to the measure and display the result.
Source result = unitPrice.join(prodSel)
.join(timeSel);
getContext().commit();
println("\nThe result without a Qualification is:");
getContext().displayResult(result);
// Get the MdmMeasureModel for the measure.
MdmMeasureModel unitPriceModel = (MdmMeasureModel) mdmUnitPrice.getModel();
// Create the Qualification.
// The code that appears in the LiteralQualification class description
// has a non-existant dimension member and an incorrect assign method
// signature.