Examples of ExpressDataProvider


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

*/
public class GettingExistingConnection extends ContextExample
{
  protected void run() throws Exception
  {
    ExpressDataProvider dp = (ExpressDataProvider) getExpressDataProvider();
       
    println("Getting the Current Connection\n");
   
    OracleConnection conn = dp.getConnection();
    println("The connection object is an instance of an "
             + conn.getClass().getName() + ".");
  }
View Full Code Here

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

    // which include the hierarchy, the level, and the local value for an
    // element of a dimension.
    props.setProperty("HierarchyValueType", "unique");

    showInfo("Creating a DataProvider...");
    dp = new ExpressDataProvider(conn, tp, props);
    // Initialize the DataProvider
    try {
      dp.initialize();
    } catch (SQLException e) {
      showError("Cannot not initialize the DataProvider. " + e);
View Full Code Here

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

  public final oracle.jdbc.OracleConnection getConnection() {
    try {
      // If we are not using an ExpressDataProvider, then use the local
      // copy of
      // the connection.
      ExpressDataProvider edp = (ExpressDataProvider) getDataProvider();
      oracle.jdbc.OracleConnection con = edp.getConnection();
      if (con != null)
        return con;
    } catch (Exception e) {
      showError("Cannot get a connection. "
          + "Using the stored connection." + e);
View Full Code Here

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

    StringSource prodHier = (StringSource) mdmProdDefLvlHier.getSource();
    StringSource timeHier = (StringSource) mdmTimeDefLvlHier.getSource();
    StringSource chanHier = (StringSource) mdmChanDefLvlHier.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 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 prodParam =
                new StringParameter(dp, "DEPT::DEPT::0");
       
    // Create parameterized Source objects for the default hierarchies of
    // the CUSTOMER_AW and PRODUCT_AW dimensions.
    StringSource prodParamSrc = dp.createParameterizedSource(prodParam);
       
    // Create derived Source objects from the hierarchies, using the
    // parameterized Source objects as the comparison Source objects.
    Source paramProdSel = prodHier.join(prodHier.value(), prodParamSrc);
       
    // Select elements from the other dimensions of the measure
    Source timeSel = timeHier.selectValues(new String[]
                                            {"TIMEHIER::DAY::20110101",
                                             "TIMEHIER::DAY::20110102",
                                             "TIMEHIER::DAY::20110103"});
               
    Source chanSel = chanHier.selectValues(new String[]
                                       {"MEDIA::MEDIA::0",
                                        "MEDIA::MEDIA::1",
                                        "MEDIA::MEDIA::2"});
                        
    // 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);
                        
    // Join the dimension selections to the measure.
    Source cube = units.join(columnEdge)
                       .join(rowEdge)
                       .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.
    // 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(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("DEPT::::1");
View Full Code Here

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

        // which include the hierarchy, the level, and the local value for an
        // element of a dimension.
        props.setProperty("HierarchyValueType", "unique");
       
        showInfo("Creating a DataProvider...");
        dp = new ExpressDataProvider(conn, tp, props);
        // Initialize the DataProvider
    try
    {
            dp.initialize();
    }
View Full Code Here

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

    {
      try
      {
      // If we are not using an ExpressDataProvider, then use the local copy of
      // the connection.
        ExpressDataProvider edp = (ExpressDataProvider) getDataProvider();
        oracle.jdbc.OracleConnection con = edp.getConnection();
      if (con != null)
        return con;
      }
    catch (Exception e)
    {
View Full Code Here

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

   * TopBottomTemplate, creates a new Cursor for the Source produced by the
   * TopBottomTemplate, and displays the values of that Cursor.
   */
  public void run() throws Exception
  {
    ExpressDataProvider dp = getExpressDataProvider();
    TransactionProvider tp = getTransactionProvider();
       
    // Get the MdmMeasure for the measure.
    MdmMeasure mdmUnits = getMdmMeasure("UNITS_AW");
    MdmMeasure mdmSales = getMdmMeasure("SALES_AW");
View Full Code Here

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

    return result;
  }
 
  public static List getRootMeasureInfo() throws Exception{
    MyOlapContext context = MyOlapContext.getMyOlapContext();
    ExpressDataProvider dp = context.getExpressDataProvider();
    MdmMetadataProvider mp = null;
      mp = (MdmMetadataProvider) dp.getDefaultMetadataProvider();
      MdmSchema rootSchema = mp.getRootSchema();
//      MdmMeasureDimension mdmMeasureDim = (MdmMeasureDimension)rootSchema.getMeasureDimension();
//      List mdmMeasures = mdmMeasureDim.getMeasures();
      List mdmMeasures = rootSchema.getMeasures();
      Iterator mdmMeasuresIter = mdmMeasures.iterator();
View Full Code Here

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

      return result;
  }

  private static Cursor getCursor(MyOlapContext context,Source source) throws TransactionInactiveException, NotCommittableException{
    context.prepareAndCommit();
    ExpressDataProvider dp = context.getExpressDataProvider();
      CursorManagerSpecification cursorMngrSpec = dp.createCursorManagerSpecification(source);
      SpecifiedCursorManager cursorMngr =
        dp.createCursorManager(cursorMngrSpec);
      Cursor queryCursor = cursorMngr.createCursor();
      return queryCursor;
  }
View Full Code Here

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

    StringSource timeHier = (StringSource) mdmTimeDefLvlHier.getSource();
    StringSource chanHier = (StringSource) mdmChanDefLvlHier.getSource();
    StringSource shipHier = (StringSource) mdmCustDefLvlHier.getSource();

    // 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);
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.