org.olap4j
Interface Position


public interface Position

Position on one of the CellSetAxis objects in a CellSet.

An axis has a particular dimensionality, that is, a set of one or more dimensions which will appear on that axis, and every position on that axis will have a member of each of those dimensions. For example, in the MDX query

SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} ON COLUMNS,
    CrossJoin(
        {[Gender].Members},
        {[Product].[Food], [Product].[Drink]}) ON ROWS
FROM [Sales]

the COLUMNS axis has dimensionality {[Measures]} and the ROWS axis has dimensionality {[Gender], [Product]}. In the result,

Gender Product Unit Sales Store Sales
All Gender Food 191,940 409,035.59
All Gender Drink 24,597 48,836.21
F Food 94,814 203,094.17
F Drink 12,202 24,457.37
M Food 97,126 205,941.42
M Drink 12,395 24,378.84

each of the six positions on the ROWS axis has two members, consistent with its dimensionality of 2. The COLUMNS axis has two positions, each with one member.

Since:
Aug 22, 2006
Version:
$Id: Position.java 229 2009-05-08 19:11:29Z jhyde $
Author:
jhyde

Method Summary
 java.util.List<Member> getMembers()
          Returns the list of Member objects at this position.
 int getOrdinal()
          Returns the zero-based ordinal of this Position on its CellSetAxis.
 

Method Detail

getMembers

java.util.List<Member> getMembers()
Returns the list of Member objects at this position.

Recall that the CellSetAxisMetaData.getHierarchies() method describes the hierarchies which occur on an axis. The positions on that axis must conform. Suppose that the ROWS axis of a given statement returns {[Gender], [Store]}. Then every Position on that axis will have two members: the first a member of the [Gender] dimension, the second a member of the [Store] dimension.

Returns:
A list of Member objects at this Position.

getOrdinal

int getOrdinal()
Returns the zero-based ordinal of this Position on its CellSetAxis.

Returns:
ordinal of this Position

SourceForge.net_Logo