Xmla.Dataset.Cellset Class
This class implements a Cellset object.
You do not need to instantiate objects of this class yourself.
Rather, the Xmla.Dataset class creates instances of this class to represent the cells (the value of the measures) of an MDX query.
(see getCellset().)
Constructor
Xmla.Dataset.Cellset
()
Item Index
Methods
cellCount
()
Int
Returns the number of cells contained in this cellset. This is the number of cells that is actually present in the cellset - not the number of logical cells. The nuber of logical cells can be be calculated by multiplying the tuple counts of all axes of the data set. The XML/A provider will typically not return empty cells, hence, the cellCount may be less than the logical cell count.
Returns:
cellOrdinal
()
Int
Returns the ordinal number of the current cell.
The ordinal is the logical cell pointer, which may be different than the physical cell pointer.
To get the physical cell pointer, see curr()
Returns:
cellOrdinalForTupleIndexes
-
tuple
Calculate the ordinal based on the specified tuple indexes.
Parameters:
-
tupleint...index - a variable list of integer arguments. Arguments represent the index of a tuple on the query axes. Tuple indexes should be specified by descending order of axes. For example, if you have a DataSet with 2 Axes, pass the row tuple index as the first argument, and the column tuple index as the last argument.
Returns:
getByOrdinal()
cellProperty
-
propertyName
Return the value of the current property of the current cell. XML/A defines these standard properties:
ValueFmtValueForeColorBackColor
Parameters:
-
propertyNameStringThe name of the property to retrieve.
Returns:
close
()
Close this cellset.
curr
()
Int
Returns the internal cell pointer. This is the fysical cell pointer.
To get the logical cell pointer, see cellOrdinal()
Returns:
eachCell
-
callback -
scope -
args
Iterate through each cell.
Parameters:
-
callbackFunction() -
scopeObject -
argsObject
Returns:
getByIndex
-
index -
object
Get a cell by its physical index.
This method should typically not be called by clients.
Instead, they should use getByOrdinal()
Parameters:
-
indexInt- the physical index of the cell within the cellset.
-
objectObject- optional. An object to copy the properties of the specified cell to. If omitted, a new object will be returned instead.
Returns:
getByOrdinal
-
ordinal -
object
Get a cell by its logical index.
Parameters:
-
ordinalInt- the ordinal number of the cell to retrieve.
-
objectObject- optional. An object to copy the properties of the specified cell to. If omitted, a new object will be returned instead.
Returns:
getByTupleIndexes
-
ordinal
Get the cell corresponding to the specified tuple indexes.
Parameters:
-
ordinalint...
Returns:
hasCellProperty
-
propertyName
Check if the cell has the specified property. XML/A defines these standard properties:
ValueFmtValueForeColorBackColor
Parameters:
-
propertyNameStringThe name of the property to check for.
Returns:
true if the current cell has the specified property, false if it doesn't.
hasMoreCells
()
Boolean
Check if there are cells to iterate through.
Returns:
true if there are more cells to iterate, false if there are no more cells to iterate.
nextCell
()
Int
Advance to the next (physical) cell. Note that this method may appear to be skipping cells. This happens when the XML/A provider omits empty cells in the response.
Returns:
readCell
-
object
Reads the current cell into the specified object.
Parameters:
-
objectObjectAn existing object to use for the current cell. If omitted, a new object will be created.
Returns:
reset
-
idx
Resets the internal cell pointer to the argument, or to 0 if the argument is omitted. Normally, you shouldn't have to call this method yourself.
Parameters:
-
idxInt
