Package oracle.olapi.data.cursor

Examples of oracle.olapi.data.cursor.Cursor


      ((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.
        System.out.println();
        System.out.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

  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

    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

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

    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

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

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.