Examples of MdmMeasure


Examples of oracle.olapi.metadata.mdm.MdmMeasure

  protected void run() throws Exception
  {
    println("Using the movingTotal Method");

    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();

    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                    mdmProdDim.getDefaultHierarchy();
    StringSource prodHier = (StringSource) mdmProdHier.getSource();
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

                                     mdmProdStdDim.getDefaultHierarchy();
    StringSource calendar = (StringSource) mdmCalendar.getSource();
    StringSource prodHier = (StringSource) mdmProdPrimary.getSource();
       
    // Get the measures and the Source objects for them.
    MdmMeasure mdmUnitCost = getMdmMeasure("UNIT_COST_AW");
    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
       
    NumberSource unitCost = (NumberSource) mdmUnitCost.getSource();
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();
   
    DataProvider dp = getContext().getDataProvider();
       
    // Get the placeholder Source for the Number data type.
    Source ph = dp.getFundamentalMetadataProvider().getNumberPlaceholder()
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

  protected void run() throws Exception
  {
    println("Creating a Custom Member of the MdmMeasureDimension\n");
       
    // Get the measures and the Source objects for the measures.
    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();
       
    MdmMeasure mdmUnitCost = getMdmMeasure("UNIT_COST_AW");
    NumberSource unitCost = (NumberSource) mdmUnitCost.getSource();
       
    // Get the primary dimensions for the measures.
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
       
    // Get the default level hierarchies of the dimensions.
    MdmLevelHierarchy mdmProdPrimary = (MdmLevelHierarchy)
    mdmProdDim.getDefaultHierarchy();
    MdmLevelHierarchy mdmCalendarYear = (MdmLevelHierarchy)
    mdmTimeDim.getDefaultHierarchy();
       
    // Get the Source objects for the hierarchies.
    StringSource prodHier = (StringSource) mdmProdPrimary.getSource();
    StringSource calendarYear = (StringSource) mdmCalendarYear.getSource();
       
    // Get the root MdmSchema.
    MdmSchema rootSchema = getMdmMetadataProvider().getRootSchema();
       
    // Get the MdmMeasureDimension of the root MdmSchema, and the Source for it.
    MdmMeasureDimension mdmMeasDim = rootSchema.getMeasureDimension();
    StringSource measDim = (StringSource) mdmMeasDim.getSource();
       
    // Specify a calculation for the custom measure.
    Source calculation = unitPrice.minus(unitCost);
       
    // Create custom measure as a custom member of the MdmMeasureDimension.
    MdmMeasure mdmMarkup = mdmMeasDim.createCustomMeasure("MARKUP_AW",
                                                           rootSchema,
                                                           calculation,
                                                           10);
    // Set the short and long value descriptions.
    mdmMarkup.setShortDescription("UNIT_PRICE_AW MINUS UNIT_COST_AW");
    mdmMarkup.setDescription("Unit price minus unit cost.");
       
    // Produce a Source that specifies the values of the members of the
    // measure dimension.
    Source measDimSel = measDim.selectValues(new String[]
                                            {mdmMarkup.getValue(),
                                             mdmUnitCost.getValue(),
                                             mdmUnitPrice.getValue()});
                
    // Get the Source objects for the short value description attributes
    // of the Product and Time dimensions.
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

    DataProvider dp = getContext().getDataProvider();
    TransactionProvider tp = getContext().getTransactionProvider();

    // Create a SingleSelectionTemplate.
    // Get the MdmMeasure for the measure.
    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");

    // 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");
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

  protected void run() throws Exception
  {
    println("Creating a Cube and Pivoting Its Edges");
       
    // Get the MdmMeasure for units.
    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");
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

  {
    dp = getContext().getDataProvider();

    try
    {
      MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
      Source unitPrice = mdmUnitPrice.getSource();

      MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
      MdmPrimaryDimension mdmTimeDim = getMdmPrimaryDimension("TIME_AW");
      MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                       mdmProdDim.getDefaultHierarchy();
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

  private void positionsInAnAsymmetricQuery(Source prodSel, Source timeSel)
    throws NotCommittableException
  {
    println("\nPositions in an Asymmetric Query");

    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
    NumberSource units = (NumberSource) mdmUnits.getSource();
    Source unitsGT1 = units.gt(1);

    MdmPrimaryDimension mdmChanDim = getMdmPrimaryDimension("CHANNEL_AW");
    MdmPrimaryDimension mdmCustDim = getMdmPrimaryDimension("CUSTOMER_AW");
    MdmLevelHierarchy mdmChanHier = (MdmLevelHierarchy)
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

   
  protected void run() throws Exception
  {
    println("Getting the Share of Units Sold");
       
    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
       
    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    Source prodDim = mdmProdDim.getSource();
       
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                       mdmProdDim.getDefaultHierarchy();
   
    // Get the Source for the default product hierarchy.
    StringSource prodHier = (StringSource) mdmProdHier.getSource();
       
    // Get the Source objects for the measure and for the default hierarchies
    // of the other dimensions.
    NumberSource units = (NumberSource) mdmUnits.getSource();
    StringSource custHier = (StringSource)
        getMdmPrimaryDimension("CUSTOMER_AW").getDefaultHierarchy().getSource();
    StringSource chanHier = (StringSource)
        getMdmPrimaryDimension("CHANNEL_AW").getDefaultHierarchy().getSource();
    StringSource timeHier = (StringSource)
View Full Code Here

Examples of oracle.olapi.metadata.mdm.MdmMeasure

  protected void run() throws Exception
  {
    println("Using the Lag Method");

    MdmMeasure mdmUnitPrice = getMdmMeasure("UNIT_PRICE_AW");
    NumberSource unitPrice = (NumberSource) mdmUnitPrice.getSource();

    MdmPrimaryDimension mdmProdDim = getMdmPrimaryDimension("PRODUCT_AW");
    MdmLevelHierarchy mdmProdHier = (MdmLevelHierarchy)
                                     mdmProdDim.getDefaultHierarchy();
    StringSource prodHier = (StringSource) mdmProdHier.getSource();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.