Package oracle.olapi.data.source

Examples of oracle.olapi.data.source.SpecifiedCursorManager


      //isCalcSet(isSet, 3); // Added to verify that calculation is set.
    }
   
    // Create a Cursor and display the results to show the parent
    // starting and ending positions.
    SpecifiedCursorManager cursorManager =
                                       dp.createCursorManager(cursorMngrSpec);

    Cursor cursor = cursorManager.createCursor();
    println("\nThe values of the Cursor are:");
    getContext().displayCursor(cursor);
    cursorManager.close();
  }
View Full Code Here


    timeSelValCSpec.setParentEndCalculationSpecified(true);
    prodSelValCSpec.setParentStartCalculationSpecified(true);
    prodSelValCSpec.setParentEndCalculationSpecified(true);

    // Create the CursorManager and the Cursor.
    SpecifiedCursorManager cursorMngr = dp.createCursorManager(cursorMngrSpec);
    CompoundCursor rootCursor = (CompoundCursor) cursorMngr.createCursor();

    // Get the child Cursor objects.
    ValueCursor baseValCursor = rootCursor.getValueCursor();
    List outputs = rootCursor.getOutputs();
    ValueCursor chanSelVals = (ValueCursor) outputs.get(0);
    ValueCursor timeSelVals = (ValueCursor) outputs.get(1);
    ValueCursor custSelVals = (ValueCursor) outputs.get(2);
    ValueCursor prodSelVals = (ValueCursor) outputs.get(3);
   
    // Set the position of the root CompoundCursor.
    rootCursor.setPosition(15);

    // Get the values at the current position and determine the span
    // of the values of the time and product outputs.
    print(chanSelVals.getCurrentValue() + ", ");
    print(timeSelVals.getCurrentValue() + ", ");
    print(custSelVals.getCurrentValue() + ", ");
    print(prodSelVals.getCurrentValue() + ", ");
    print(baseValCursor.getCurrentValue());
    println();

    // Determine the span of the values of the two fastest varying outputs.
    long span;
    span = ((prodSelVals.getParentEnd() - prodSelVals.getParentStart()) +1);
    println("The span of " + prodSelVals.getCurrentValue() +
            " at the current position is " + span + ".");
    span = ((timeSelVals.getParentEnd() - timeSelVals.getParentStart()) +1);
    println("The span of " + timeSelVals.getCurrentValue() +
            " at the current position is " + span + ".");

    cursorMngr.close();
  }
View Full Code Here

    prepareAndCommit();
                                 
    // Create a Cursor.
    CursorManagerSpecification cMngrSpec =
            getExpressDataProvider().createCursorManagerSpecification(result);
    SpecifiedCursorManager  spCMngr =
            getExpressDataProvider().createCursorManager(cMngrSpec);
    Cursor resultsCursor = spCMngr.createCursor();
                                 
    // Display the results.
    getContext().displayCursor(resultsCursor, true);
                                 
    //Reset the Cursor position to 1;
View Full Code Here

  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

    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.
View Full Code Here

    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

    prepareAndCommit();

    CursorManagerSpecification cursorMngrSpec =
           dp.createCursorManagerSpecification(prodSel);
    SpecifiedCursorManager cursorMngr =
                dp.createCursorManager(cursorMngrSpec);
    ValueCursor prodSelValCursor = (ValueCursor) cursorMngr.createCursor();

    // prodSelValCursor is the ValueCursor for prodSel
    println("ValueCursor Position  Value ");
    println("--------------------  ------------------------ ");
    do
    {
      println("          " + prodSelValCursor.getPosition() +
              "           " + prodSelValCursor.getCurrentValue());
    }
    while(prodSelValCursor.next());

    prodSelValCursor.setPosition(2);
    println("The current position is " + prodSelValCursor.getPosition());
    println(prodSelValCursor.getCurrentString());

    cursorMngr.close();
   }
View Full Code Here

  {
    prepareAndCommit();
    CursorManagerSpecification cursorMngrSpec =
                dp.createCursorManagerSpecification(querySource);
    SpecifiedCursorManager cursorMngr =
                dp.createCursorManager(cursorMngrSpec);
    Cursor queryCursor = cursorMngr.createCursor();

    // Use the Cursor in some way, such as to display its values.
    getContext().displayCursor(queryCursor);
   
    return queryCursor;
View Full Code Here

TOP

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

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.