mondrian.olap
Class QueryAxis

java.lang.Object
  extended by mondrian.olap.QueryPart
      extended by mondrian.olap.QueryAxis
All Implemented Interfaces:
Walkable

public class QueryAxis
extends QueryPart

An axis in an MDX query. For example, the typical MDX query has two axes, which appear as the "ON COLUMNS" and "ON ROWS" clauses.

 

Nested Class Summary
static class QueryAxis.SubtotalVisibility
          SubtotalVisibility enumerates the allowed values of whether subtotals are visible.
 
Constructor Summary
QueryAxis(boolean nonEmpty, Exp set, AxisOrdinal axisDef, QueryAxis.SubtotalVisibility subtotalVisibility)
          Creates an axis with no dimension properties.
QueryAxis(boolean nonEmpty, Exp set, AxisOrdinal axisDef, QueryAxis.SubtotalVisibility subtotalVisibility, Id[] dimensionProperties)
          Creates an axis.
 
Method Summary
 Object accept(MdxVisitor visitor)
           
 void addLevel(Level level)
           
 Object clone()
           
(package private) static QueryAxis[] cloneArray(QueryAxis[] a)
           
 Calc compile(ExpCompiler compiler, List<ResultStyle> resultStyles)
           
 String getAxisName()
           
 AxisOrdinal getAxisOrdinal()
          Returns the ordinal of this axis, for example AxisOrdinal.ROWS.
 Object[] getChildren()
          Returns an array of the object's children.
 Id[] getDimensionProperties()
           
 Exp getSet()
          Returns the expression which is used to compute the value of this axis.
 QueryAxis.SubtotalVisibility getSubtotalVisibility()
           
 boolean isNonEmpty()
          Returns whether the axis has the NON EMPTY property set.
 boolean isOrdered()
          Returns whether the axis has the ORDER property set.
 void resetSubtotalVisibility()
           
 void resolve(Validator validator)
           
 void setNonEmpty(boolean nonEmpty)
          Sets whether the axis has the NON EMPTY property set.
 void setOrdered(boolean ordered)
          Sets whether the axis has the ORDER property set.
 void setSet(Exp set)
          Sets the expression which is used to compute the value of this axis.
(package private)  void setSubtotalVisibility(boolean bShowSubtotals)
           
 void unparse(PrintWriter pw)
          Writes a string representation of this parse tree node to the given writer.
 void validate(Validator validator)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryAxis

public QueryAxis(boolean nonEmpty,
                 Exp set,
                 AxisOrdinal axisDef,
                 QueryAxis.SubtotalVisibility subtotalVisibility,
                 Id[] dimensionProperties)
Creates an axis.

Parameters:
nonEmpty - Whether to filter out members of this axis whose cells are all empty
set - Expression to populate the axis
axisDef - Which axis (ROWS, COLUMNS, etc.)
subtotalVisibility - Whether to show subtotals
dimensionProperties - List of dimension properties

QueryAxis

public QueryAxis(boolean nonEmpty,
                 Exp set,
                 AxisOrdinal axisDef,
                 QueryAxis.SubtotalVisibility subtotalVisibility)
Creates an axis with no dimension properties.

See Also:
QueryAxis(boolean,Exp,AxisOrdinal,mondrian.olap.QueryAxis.SubtotalVisibility,Id[])
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

cloneArray

static QueryAxis[] cloneArray(QueryAxis[] a)

accept

public Object accept(MdxVisitor visitor)

compile

public Calc compile(ExpCompiler compiler,
                    List<ResultStyle> resultStyles)

getAxisName

public String getAxisName()

getAxisOrdinal

public AxisOrdinal getAxisOrdinal()
Returns the ordinal of this axis, for example AxisOrdinal.ROWS.


isNonEmpty

public boolean isNonEmpty()
Returns whether the axis has the NON EMPTY property set.


setNonEmpty

public void setNonEmpty(boolean nonEmpty)
Sets whether the axis has the NON EMPTY property set. See isNonEmpty().


isOrdered

public boolean isOrdered()
Returns whether the axis has the ORDER property set.


setOrdered

public void setOrdered(boolean ordered)
Sets whether the axis has the ORDER property set.


getSet

public Exp getSet()
Returns the expression which is used to compute the value of this axis.


setSet

public void setSet(Exp set)
Sets the expression which is used to compute the value of this axis. See getSet().


resolve

public void resolve(Validator validator)

getChildren

public Object[] getChildren()
Description copied from interface: Walkable
Returns an array of the object's children. Those which are not Walkable are ignored.

Specified by:
getChildren in interface Walkable
Overrides:
getChildren in class QueryPart

unparse

public void unparse(PrintWriter pw)
Description copied from class: QueryPart
Writes a string representation of this parse tree node to the given writer.

Overrides:
unparse in class QueryPart
Parameters:
pw - writer

addLevel

public void addLevel(Level level)

setSubtotalVisibility

void setSubtotalVisibility(boolean bShowSubtotals)

getSubtotalVisibility

public QueryAxis.SubtotalVisibility getSubtotalVisibility()

resetSubtotalVisibility

public void resetSubtotalVisibility()

validate

public void validate(Validator validator)

getDimensionProperties

public Id[] getDimensionProperties()

SourceForge.net_Logo