Examples of ExpressDataProvider


Examples of oracle.express.olapi.data.full.ExpressDataProvider

    StringSource timeHier = (StringSource) mdmTimeDefLvlHier.getSource();
    StringSource chanHier = (StringSource) mdmChanDefLvlHier.getSource();
    StringSource custHier = (StringSource) mdmCustDefLvlHier.getSource();
       
    // Get the DataProvider.
    ExpressDataProvider dp = getExpressDataProvider();
       
    // Get the short description attribute for the dimensions and the
    // Source objects for the attributes.
    MdmAttribute mdmProdShortDescr =
                              mdmProdDim.getShortValueDescriptionAttribute();
    Source prodShortDescr = mdmProdShortDescr.getSource();
    MdmAttribute mdmCustShortDescr =
                              mdmCustDim.getShortValueDescriptionAttribute();
    Source custShortDescr = mdmCustShortDescr.getSource();
    MdmAttribute mdmTimeShortDescr =
                              mdmTimeDim.getShortValueDescriptionAttribute();
    Source timeShortDescr = mdmTimeShortDescr.getSource();
   
    // Get the short description attribute for the channel dimension.
    MdmAttribute mdmChanShortDescr =
                              mdmChanDim.getShortValueDescriptionAttribute();
    Source chanShortDescr = mdmChanShortDescr.getSource();
       
    // Create Parameter objects with values from the CUSTOMER_AW and
    // PRODUCT_AW dimensions.
    StringParameter custParam =
                      new StringParameter(dp, "SHIPMENTS_AW::REGION_AW::9");
    StringParameter prodParam =
                new StringParameter(dp, "PRODUCT_PRIMARY_AW::FAMILY_AW::4");
       
    // Create parameterized Source objects for the default hierarchies of
    // the CUSTOMER_AW and PRODUCT_AW dimensions.
    StringSource custParamSrc = dp.createParameterizedSource(custParam);
    StringSource prodParamSrc = dp.createParameterizedSource(prodParam);
       
    // Create derived Source objects from the hierarchies, using the
    // parameterized Source objects as the comparison Source objects.
    Source paramCustSel = custHier.join(custHier.value(), custParamSrc);
    Source paramProdSel = prodHier.join(prodHier.value(), prodParamSrc);
       
    // Select elements from the other dimensions of the measure
    Source timeSel = timeHier.selectValues(new String[]
                                            {"CALENDAR_YEAR_AW::YEAR_AW::2",
                                             "CALENDAR_YEAR_AW::YEAR_AW::3",
                                             "CALENDAR_YEAR_AW::YEAR_AW::4"});
               
    Source chanSel = chanHier.selectValues(new String[]
                                       {"CHANNEL_PRIMARY_AW::CHANNEL_AW::2",
                                        "CHANNEL_PRIMARY_AW::CHANNEL_AW::3",
                                        "CHANNEL_PRIMARY_AW::CHANNEL_AW::4"});
                        
    // Join the dimension selections to the short description attributes
    // for the dimensions.
    Source columnEdge = chanSel.join(chanShortDescr);
    Source rowEdge = timeSel.join(timeShortDescr);
    Source page1 = paramProdSel.join(prodShortDescr);
    Source page2 = paramCustSel.join(custShortDescr);
                        
    // Join the dimension selections to the measure.
    Source cube = units.join(columnEdge)
                       .join(rowEdge)
                       .join(page2)
                       .join(page1);
                        
    // Prepare and commit the current Transaction.
    prepareAndCommit();
                        
    // Create a Cursor for the query.
    CursorManagerSpecification cMngrSpec =
                                 dp.createCursorManagerSpecification(cube);
    SpecifiedCursorManager  spCMngr = dp.createCursorManager(cMngrSpec);
    CompoundCursor cubeCursor = (CompoundCursor) spCMngr.createCursor();
    getContext().displayCursorAsCrosstab(cubeCursor);
                        
    // Change the customer parameter value.
    custParam.setValue("SHIPMENTS_AW::REGION_AW::10");
                        
    // Reset the Cursor position to 1.
    cubeCursor.setPosition(1);
    println();
    getContext().displayCursorAsCrosstab(cubeCursor);
                        
    // Pivot the column and row edges.
    columnEdge = timeSel.join(timeShortDescr);
    rowEdge = chanSel.join(chanShortDescr);
                        
    // Join the dimension selections to the measure.
    cube = units.join(columnEdge)
                .join(rowEdge)
                .join(page2)
                .join(page1);
                        
    prepareAndCommit();
                        
    // Create another Cursor.
    cMngrSpec = dp.createCursorManagerSpecification(cube);
    spCMngr = dp.createCursorManager(cMngrSpec);
    cubeCursor = (CompoundCursor) spCMngr.createCursor();
    getContext().displayCursorAsCrosstab(cubeCursor);
                        
    // Change the product parameter value.
    prodParam.setValue("PRODUCT_PRIMARY_AW::FAMILY_AW::5");
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.