oracle.olapi.data.cursor
Interface ValueCursor

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 of a DataProvider. Such a Source has one element whose value is null. In contrast, a Source returned by the getEmptySource method of 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.

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

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.