mondrian.rolap
Class RolapAggregator
java.lang.Object
mondrian.olap.EnumeratedValues.BasicValue
mondrian.rolap.RolapAggregator
- All Implemented Interfaces:
- Aggregator, EnumeratedValues.Value
- Direct Known Subclasses:
- RolapAggregator.BaseAggor
public abstract class RolapAggregator
- extends EnumeratedValues.BasicValue
- implements Aggregator
Describes an aggregation operator, such as "sum" or "count".
- Since:
- Jul 9, 2003
- Author:
- jhyde
-
-
Nested Class Summary |
static class |
RolapAggregator.AvgFromAvg
Aggregator used for aggregate tables implementing the
average aggregator. |
static class |
RolapAggregator.AvgFromSum
Aggregator used for aggregate tables implementing the
average aggregator. |
protected static class |
RolapAggregator.BaseAggor
This is the base class for implementing aggregators over sum and
average columns in an aggregate table. |
static class |
RolapAggregator.SumFromAvg
This is an aggregator used for aggregate tables implementing the
sum aggregator. |
Sum
public static final RolapAggregator Sum
Count
public static final RolapAggregator Count
Min
public static final RolapAggregator Min
Max
public static final RolapAggregator Max
Avg
public static final RolapAggregator Avg
DistinctCount
public static final RolapAggregator DistinctCount
enumeration
public static final EnumeratedValues<RolapAggregator> enumeration
- List of all valid aggregation operators.
RolapAggregator
public RolapAggregator(String name,
int ordinal,
boolean distinct)
isDistinct
public boolean isDistinct()
getExpression
public String getExpression(String operand)
- Returns the expression to apply this aggregator to an operand.
For example,
getExpression("emp.sal")
returns
"sum(emp.sal)"
.
getNonDistinctAggregator
public RolapAggregator getNonDistinctAggregator()
- If this is a distinct aggregator, returns the corresponding non-distinct
aggregator, otherwise throws an error.
getRollup
public Aggregator getRollup()
- Returns the aggregator used to roll up. By default, aggregators roll up
themselves.
- Specified by:
getRollup
in interface Aggregator