Package mondrian.olap
Class QueryAxis
- java.lang.Object
-
- mondrian.olap.QueryPart
-
- mondrian.olap.QueryAxis
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryAxis.SubtotalVisibilitySubtotalVisibilityenumerates the allowed values of whether subtotals are visible.
-
Constructor Summary
Constructors Constructor Description QueryAxis(boolean nonEmpty, Exp set, AxisOrdinal axisOrdinal, QueryAxis.SubtotalVisibility subtotalVisibility)Creates an axis with no dimension properties.QueryAxis(boolean nonEmpty, Exp set, AxisOrdinal axisOrdinal, QueryAxis.SubtotalVisibility subtotalVisibility, Id[] dimensionProperties)Creates an axis.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectaccept(MdxVisitor visitor)voidaddLevel(Level level)Objectclone()(package private) static QueryAxis[]cloneArray(QueryAxis[] a)Calccompile(ExpCompiler compiler, ResultStyle resultStyle)StringgetAxisName()AxisOrdinalgetAxisOrdinal()Returns the ordinal of this axis, for exampleAxisOrdinal.StandardAxisOrdinal.ROWS.Object[]getChildren()Returns an array of the object's children.Id[]getDimensionProperties()ExpgetSet()Returns the expression which is used to compute the value of this axis.QueryAxis.SubtotalVisibilitygetSubtotalVisibility()booleanisNonEmpty()Returns whether the axis has theNON EMPTYproperty set.booleanisOrdered()Returns whether the axis has theORDERproperty set.voidresetSubtotalVisibility()voidresolve(Validator validator)voidsetNonEmpty(boolean nonEmpty)Sets whether the axis has theNON EMPTYproperty set.voidsetOrdered(boolean ordered)Sets whether the axis has theORDERproperty set.voidsetSet(Exp set)Sets the expression which is used to compute the value of this axis.(package private) voidsetSubtotalVisibility(boolean bShowSubtotals)voidunparse(PrintWriter pw)Writes a string representation of this parse tree node to the given writer.voidvalidate(Validator validator)
-
-
-
Constructor Detail
-
QueryAxis
public QueryAxis(boolean nonEmpty, Exp set, AxisOrdinal axisOrdinal, QueryAxis.SubtotalVisibility subtotalVisibility, Id[] dimensionProperties)Creates an axis.- Parameters:
nonEmpty- Whether to filter out members of this axis whose cells are all emptyset- Expression to populate the axisaxisOrdinal- Which axis (ROWS, COLUMNS, etc.)subtotalVisibility- Whether to show subtotalsdimensionProperties- List of dimension properties
-
QueryAxis
public QueryAxis(boolean nonEmpty, Exp set, AxisOrdinal axisOrdinal, QueryAxis.SubtotalVisibility subtotalVisibility)Creates an axis with no dimension properties.
-
-
Method Detail
-
accept
public Object accept(MdxVisitor visitor)
-
compile
public Calc compile(ExpCompiler compiler, ResultStyle resultStyle)
-
getAxisName
public String getAxisName()
-
getAxisOrdinal
public AxisOrdinal getAxisOrdinal()
Returns the ordinal of this axis, for exampleAxisOrdinal.StandardAxisOrdinal.ROWS.
-
isNonEmpty
public boolean isNonEmpty()
Returns whether the axis has theNON EMPTYproperty set.
-
setNonEmpty
public void setNonEmpty(boolean nonEmpty)
Sets whether the axis has theNON EMPTYproperty set. SeeisNonEmpty().
-
isOrdered
public boolean isOrdered()
Returns whether the axis has theORDERproperty set.
-
setOrdered
public void setOrdered(boolean ordered)
Sets whether the axis has theORDERproperty 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. SeegetSet().
-
resolve
public void resolve(Validator validator)
-
getChildren
public Object[] getChildren()
Description copied from interface:WalkableReturns an array of the object's children. Those which are notWalkableare ignored.- Specified by:
getChildrenin interfaceWalkable- Overrides:
getChildrenin classQueryPart
-
unparse
public void unparse(PrintWriter pw)
Description copied from class:QueryPartWrites a string representation of this parse tree node to the given 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()
-
-