public interface ValueCursor extends Cursor
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.
FETCH_SIZE_NOT_SPECIFIED
Modifier and Type | Method and Description |
---|---|
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. |
getExtent, getFetchSize, getParentEnd, getParentStart, getPosition, getSource, next, setFetchSize, setPosition
boolean hasCurrentValue()
ValueCursor
has a value at its current position.true
if the ValueCursor
has a value at its current position and false
if it does not.java.lang.Object getCurrentValue()
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.boolean getCurrentBoolean()
boolean
value at the current position in the ValueCursor
.boolean
value at the current position.java.lang.String getCurrentString()
String
value at the current position in the ValueCursor
.String
value at the current position.short getCurrentShort()
short
value at the current position in the ValueCursor
.short
value at the current position.int getCurrentInteger()
int
value at the current position in the ValueCursor
.int
value at the current position.float getCurrentFloat()
float
value at the current position in the ValueCursor
.float
value at the current position.double getCurrentDouble()
double
value at the current position in the ValueCursor
.double
value at the current position.java.util.Date getCurrentDate()
Date
value at the current position in the ValueCursor
.Date
value at the current position.SourceIdentifier getCurrentSource()
SourceIdentifier
for the ValueCursor
.SourceIdentifier
for the ValueCursor
.