Package oracle.olapi.data.source

Examples of oracle.olapi.data.source.NumberParameter


    Source custHier = (Source) sourceList.get(3);
    Source chanHier = (Source) sourceList.get(4);
    Source prodShortDescr = (Source) sourceList.get(5);
   
    // Example from NumberParameter.
    NumberParameter numParam = new NumberParameter(dp, 1000);
    NumberSource numParamSrc = dp.createParameterizedSource(numParam);
   
    NumberSource qualifiedUnits = (NumberSource)
                     units.join(timeHier, "CALENDAR_YEAR_AW::YEAR_AW::4")
                          .join(custHier, "SHIPMENTS_AW::REGION_AW::9")
View Full Code Here


    // 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.
    NumberSource result = (NumberSource)
                            units.join(chanHier,
                                       "CHANNEL_PRIMARY_AW::CHANNEL_AW::4")
                                 .join(timeHier, "CALENDAR_YEAR_AW::YEAR_AW::4")
                                 .join(shipHier,
                                       "SHIPMENTS_AW::TOTAL_CUSTOMER_AW::1")
                                 .join(paramProdSelIntervalShortDescr);

    // Prepare and commit the current transaction.
    prepareAndCommit();

    // Create a Cursor.
    CursorManagerSpecification cMngrSpec =
                            dp.createCursorManagerSpecification(result);
    SpecifiedCursorManager  spCMngr = dp.createCursorManager(cMngrSpec);
    Cursor resultCursor = spCMngr.createCursor();

    // Display the results.
    getContext().displayCursor(resultCursor);

    //Reset the Cursor position to 1.
     resultCursor.setPosition(1);

     //Change the value of the parameterized Source.
     startParam.setValue(7);
     endParam.setValue(12);

    // Using the same Cursor, display the results again.
    println();
    getContext().displayCursor(resultCursor);
  }
View Full Code Here

TOP

Related Classes of oracle.olapi.data.source.NumberParameter

Copyright © 2018 www.massapicom. 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.