Package oracle.olapi.data.source

Examples of oracle.olapi.data.source.SpecifiedCursorManager


   *            dimension element values.
   */
  private void _displayResult(Source source, boolean displayLocVal) {
    CursorManagerSpecification cursorMngrSpec = dp
        .createCursorManagerSpecification(source);
    SpecifiedCursorManager cursorManager = dp
        .createCursorManager(cursorMngrSpec);
    Cursor cursor = cursorManager.createCursor();

    cpw.printCursor(cursor, displayLocVal);

    // Close the CursorManager.
    cursorManager.close();
  }
View Full Code Here


      //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

   *            DynamicDefinition for the TopBottomTemplate example.
   */
  public void displayTopBottomResult(Source source) {
    CursorManagerSpecification cursorMngrSpec = dp
        .createCursorManagerSpecification(source);
    SpecifiedCursorManager cursorManager = dp
        .createCursorManager(cursorMngrSpec);
    ValueCursor valueCursor = (ValueCursor) cursorManager.createCursor();

    cpw.printTopBottomResult(valueCursor);

    // Close the CursorManager.
    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 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

     */
  private void _displayResult(Source source, boolean displayLocVal)
  {
        CursorManagerSpecification cursorMngrSpec =
                dp.createCursorManagerSpecification(source);
        SpecifiedCursorManager cursorManager =
                dp.createCursorManager(cursorMngrSpec);
        Cursor cursor = cursorManager.createCursor();
       
        cpw.printCursor(cursor, displayLocVal);
       
        // Close the CursorManager.
        cursorManager.close();
    }
View Full Code Here

     */
  public void displayTopBottomResult(Source source)
  {
        CursorManagerSpecification cursorMngrSpec =
                dp.createCursorManagerSpecification(source);
        SpecifiedCursorManager cursorManager =
                dp.createCursorManager(cursorMngrSpec);
        ValueCursor valueCursor = (ValueCursor) cursorManager.createCursor();
       
        cpw.printTopBottomResult(valueCursor);
       
        // Close the CursorManager.
        cursorManager.close();
    }
View Full Code Here

    println("\nCreating a Cursor");

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

    cursorMngr.close();
  }
View Full Code Here

    Source prodSource = mdmProdHier.getSource();
    // Because prodSource is a primary Source, you do not need to
    // prepare and commit the current Transaction.
    CursorManagerSpecification cursorMngrSpec =
                 dp.createCursorManagerSpecification(prodSource);
    SpecifiedCursorManager cursorMngr =
                 dp.createCursorManager(cursorMngrSpec);
    // Because the Source has no outputs, the Cursor for it
    // is a ValueCursor.
    ValueCursor prodValues = (ValueCursor) cursorMngr.createCursor();
    // Set the position to the fifth element of the ValueCursor.
    prodValues.setPosition(5);

    // Product values are strings. Get the String value at the
    // current position.
View Full Code Here

    prepareAndCommit();

    // Create a Cursor for unitsForSelections.
    CursorManagerSpecification cursorMngrSpec =
                   dp.createCursorManagerSpecification(unitsForSelections);
    SpecifiedCursorManager cursorMngr =
                   dp.createCursorManager(cursorMngrSpec);
    CompoundCursor unitsForSelCursor =
                   (CompoundCursor) cursorMngr.createCursor();

    // Get the base ValueCursor.
    ValueCursor specifiedUnitsVals = unitsForSelCursor.getValueCursor();

    // Get the outputs.
    List outputs = unitsForSelCursor.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);

    // You can now get the values from the ValueCursor objects.
    // When you have finished using the Cursor objects, close the
    // SpecifiedCursorManager.
    int i = 1;
    do
    {
      println(i + ": " +
              chanSelVals.getCurrentString() + ", " +
              timeSelVals.getCurrentString() + ", " +
              custSelVals.getCurrentString() + ", " +
              prodSelVals.getCurrentString() + ", " +
              specifiedUnitsVals.getCurrentValue());
      i++;
    }
    while(unitsForSelCursor.next());

    cursorMngr.close();

    // Create an ArrayList of the Source objects for use by other examples.
    ArrayList sourcesFromExample4 = new ArrayList();
    sourcesFromExample4.add(units);
    sourcesFromExample4.add(prodSel);
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.