Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

oracle.olapi.data.cursor
Interface ValueCursor


public abstract interface ValueCursor
extends Cursor

A Cursor that has a value at its current position. A value can be any of the OLAP API data types or a Source.

The value at the current position of a ValueCursor can also be null, in which case the hasCurrentValue method returns false. An example of a ValueCursor with an element whose value is null is the Cursor for a Source that was returned by the getVoidSource method on a DataProvider. Such a Source has one element whose value is null. In contrast, a Source returned by the getEmptySource method on a DataProvider has no elements, so it has no values, not even a null value. You cannot create a ValueCursor for an empty Source because the result set has no elements.

A ValueCursor can have a single value or many values. For a ValueCursor that is a descendent of a CompoundCursor, the number of values it has, and therefore the number of positions, is specified by the set of values of the slower-varying outputs of the CompoundCursor. For example, a measure that has three dimensions might have a single value for any one set of its selected dimension values. If an application creates a query based on the measure and each dimension is an output in the query, then the base ValueCursor for the query has a single value (and only one position) for each set of values of the outputs.


Fields inherited from class oracle.olapi.data.cursor.Cursor
FETCH_SIZE_NOT_SPECIFIED

 

Method Summary
 boolean getCurrentBoolean()
          Gets the boolean value at the current position in the ValueCursor.
 java.util.Date getCurrentDate()
          Gets the Date value at the current position in the ValueCursor.
 double getCurrentDouble()
          Gets the double value at the current position in the ValueCursor.
 float getCurrentFloat()
          Gets the float value at the current position in the ValueCursor.
 int getCurrentInteger()
          Gets the int value at the current position in the ValueCursor.
 short getCurrentShort()
          Gets the short value at the current position in the ValueCursor.
 SourceIdentifier getCurrentSource()
          Gets the SourceIdentifier for the ValueCursor.
 java.lang.String getCurrentString()
          Gets the String value at the current position in the ValueCursor.
 java.lang.Object getCurrentValue()
          Gets the value at the current position of the ValueCursor.
 boolean hasCurrentValue()
          Indicates whether the ValueCursor has a value at its current position.

 

Methods inherited from interface oracle.olapi.data.cursor.Cursor
getExtent, getFetchSize, getParentEnd, getParentStart, getPosition, getSource, next, setFetchSize, setPosition

 

Method Detail

hasCurrentValue

public boolean hasCurrentValue()
Indicates whether the ValueCursor has a value at its current position.
Returns:
true if the ValueCursor has a value at its current position and false if it does not.

getCurrentValue

public java.lang.Object getCurrentValue()
Gets the value at the current position of the ValueCursor. The value can be a Source or any of the specific data types such as boolean, integer, or String. This method is less efficient than the more specific methods, but getCurrentValue can return any value.
Returns:
The value at the current position.

getCurrentBoolean

public boolean getCurrentBoolean()
Gets the boolean value at the current position in the ValueCursor.
Returns:
The boolean value at the current position.

getCurrentString

public java.lang.String getCurrentString()
Gets the String value at the current position in the ValueCursor.
Returns:
The String value at the current position.

getCurrentShort

public short getCurrentShort()
Gets the short value at the current position in the ValueCursor.
Returns:
The short value at the current position.

getCurrentInteger

public int getCurrentInteger()
Gets the int value at the current position in the ValueCursor.
Returns:
The int value at the current position.

getCurrentFloat

public float getCurrentFloat()
Gets the float value at the current position in the ValueCursor.
Returns:
The float value at the current position.

getCurrentDouble

public double getCurrentDouble()
Gets the double value at the current position in the ValueCursor.
Returns:
The double value at the current position.

getCurrentDate

public java.util.Date getCurrentDate()
Gets the Date value at the current position in the ValueCursor.
Returns:
The Date value at the current position.

getCurrentSource

public SourceIdentifier getCurrentSource()
Gets the SourceIdentifier for the ValueCursor.
Returns:
The SourceIdentifier for the ValueCursor.

Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

Copyright © 2002, 2003, Oracle. All Rights Reserved.