Package oracle.olapi.data.cursor

Examples of oracle.olapi.data.cursor.Cursor


  private void printPageHeadings(List pageCursors)
  {
    Iterator pageIter = pageCursors.iterator();
    while (pageIter.hasNext())
    {
      Cursor cursor = (Cursor) pageIter.next();
      if (cursor instanceof CompoundCursor)
      {
        CompoundCursor cc = (CompoundCursor) cursor;
        List outputs = cc.getOutputs();
        ValueCursor output = (ValueCursor) outputs.get(0);
View Full Code Here


    try
    {
      // Display the results when the product selection is joined to the
      // short description attribute.
      CursorManager  cursorManager = dp.createCursorManager(results);
      Cursor resultsCursor = cursorManager.createCursor();
      getContext().displayCursor(resultsCursor);
     
      // The rest of the example is in the following method.
      changeParameter(numParam, resultsCursor);
    }
    catch(Exception e)
    {
      // If unsuccessful, display the results without joining to the
      // short description attribute.
      CursorManager  cursorManager = dp.createCursorManager(paramProdSel);
      Cursor resultsCursor = cursorManager.createCursor();
      getContext().displayCursor(resultsCursor);
     
      // The rest of the example is in the following method.
      changeParameter(numParam, resultsCursor);
    }
View Full Code Here

    if(cursor instanceof CompoundCursor)
    {
      CompoundCursor compoundCursor = (CompoundCursor)cursor;
      print("(");
      Iterator iterOutputs = compoundCursor.getOutputs().iterator();
      Cursor output = (Cursor)iterOutputs.next();
      _printTuple(output, displayLocVal);
      while(iterOutputs.hasNext())
      {
        print(",");
        _printTuple((Cursor)iterOutputs.next(), displayLocVal);
View Full Code Here

      ((Cursor) outputIter.next()).setPosition(1);
   
    // The last output is fastest-varying; it represents columns.
    // The next to last output represents rows.
    // All other outputs are on the page.
    Cursor colCursor = (Cursor) outputs.get(nOutputs - 1);
    Cursor rowCursor = (Cursor) outputs.get(nOutputs - 2);
    ArrayList pageCursors = new ArrayList();
    for (int i = 0 ; i < nOutputs - 2 ; i++)
    {
      pageCursors.add(outputs.get(i));
    }
View Full Code Here

   */
  private void printPages(List pageCursors, int pageIndex, Cursor rowCursor,
                          Cursor colCursor, ValueCursor dataCursor)
  {
    // Get a Cursor for this page.
    Cursor pageCursor = (Cursor) pageCursors.get(pageIndex);
   
    // Loop over the values of this page dimension
    do
    {
      // If this is the fastest-varying page dimension, print a page.
      if (pageIndex == pageCursors.size() - 1)
      {
        // Print the values of the page dimensions.
        printPageHeadings(pageCursors);
       
        // Print the column headings.
        printColumnHeadings(colCursor);
       
        // Print the rows
        printRows(rowCursor, colCursor, dataCursor);
       
        // Print a couple of blank lines to delimit pages.
        println();
        println();
      }
     
      // If this is not the fastest-varying page, recurse to the
      // next fastest varying dimension.
      else
      {
        printPages(pageCursors, pageIndex + 1, rowCursor, colCursor,
                   dataCursor);
      }
    } while (pageCursor.next());
   
    // Reset this page dimension Cursor to its first element.
    pageCursor.setPosition(1);
  }
View Full Code Here

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

    // Send the Cursor to a method that does different operations.
    // depending on whether the Cursor is a CompoundCursor or a
    // ValueCursor.
    getContext().printCursor(unitsForSelCursor);
View Full Code Here

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

                                cursorMngrSpec.getRootCursorSpecification();
    // Get the default fetch size.
    println("The default fetch size is "
            + rootCursorSpec.getDefaultFetchSize() + ".");
    CursorManager cursorMngr = dp.createCursorManager(cursorMngrSpec);
    Cursor rootCursor = cursorMngr.createCursor();
    rootCursor.setFetchSize(10);
    println("The fetch size is now " + rootCursor.getFetchSize() + ".");
  }
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

    if(cursor instanceof CompoundCursor)
    {
      CompoundCursor compoundCursor = (CompoundCursor)cursor;
      System.out.print("(");
      Iterator iterOutputs = compoundCursor.getOutputs().iterator();
      Cursor output = (Cursor)iterOutputs.next();
      _printTuple(output, displayLocVal);
      while(iterOutputs.hasNext())
      {
        System.out.print(",");
        _printTuple((Cursor)iterOutputs.next(), displayLocVal);
View Full Code Here

TOP

Related Classes of oracle.olapi.data.cursor.Cursor

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.