public interface ExpCompiler
Modifier and Type | Interface and Description |
---|---|
static class |
ExpCompiler.Factory
The
ExpCompiler.Factory is used to access
ExpCompiler implementations. |
Modifier and Type | Method and Description |
---|---|
Calc |
compile(Exp exp)
Compiles an expression.
|
Calc |
compileAs(Exp exp,
Type resultType,
List<ResultStyle> preferredResultStyles)
Compiles an expression to a given result type.
|
BooleanCalc |
compileBoolean(Exp exp)
Compiles an expression which yields a
boolean result. |
DateTimeCalc |
compileDateTime(Exp exp)
Compiles an expression which yields a
Date result. |
DimensionCalc |
compileDimension(Exp exp)
Compiles an expression which yields a
Dimension result. |
DoubleCalc |
compileDouble(Exp exp)
Compiles an expression which yields a
double result. |
HierarchyCalc |
compileHierarchy(Exp exp)
Compiles an expression which yields a
Hierarchy result. |
IntegerCalc |
compileInteger(Exp exp)
Compiles an expression which yields an
int result. |
IterCalc |
compileIter(Exp exp)
Compiles an expression which yields an immutable
Iterable result. |
LevelCalc |
compileLevel(Exp exp)
Compiles an expression which yields a
Level result. |
ListCalc |
compileList(Exp exp)
Compiles an expression which yields an immutable
TupleList
result. |
ListCalc |
compileList(Exp exp,
boolean mutable)
Compiles an expression which yields
TupleList result. |
MemberCalc |
compileMember(Exp exp)
Compiles an expression which yields a
Member result. |
Calc |
compileScalar(Exp exp,
boolean specific)
Compiles an expression to yield a scalar result.
|
StringCalc |
compileString(Exp exp)
Compiles an expression which yields a
String result. |
TupleCalc |
compileTuple(Exp exp)
Compiles an expression which yields a tuple result.
|
List<ResultStyle> |
getAcceptableResultStyles()
Returns a list of the
ResultStyle s
acceptable to the caller. |
Evaluator |
getEvaluator()
Returns the evaluator to be used for evaluating expressions during the
compilation process.
|
Validator |
getValidator()
Returns the validator which was used to validate this expression.
|
ParameterSlot |
registerParameter(Parameter parameter)
Implements a parameter, returning a unique slot which will hold the
parameter's value.
|
Evaluator getEvaluator()
Validator getValidator()
Calc compile(Exp exp)
exp
- ExpressionCalc compileAs(Exp exp, Type resultType, List<ResultStyle> preferredResultStyles)
If resultType
is not null, casts the expression to that
type. Throws an exception if that conversion is not allowed by the
type system.
The preferredResultStyles
parameter specifies a list
of desired result styles. It must not be null, but may be empty.
exp
- ExpressionresultType
- Desired result type, or null to use expression's
current typepreferredResultStyles
- List of result types, in descending order
of preference. Never null.MemberCalc compileMember(Exp exp)
Member
result.DimensionCalc compileDimension(Exp exp)
Dimension
result.HierarchyCalc compileHierarchy(Exp exp)
Hierarchy
result.IntegerCalc compileInteger(Exp exp)
int
result.
The expression is implicitly converted into a scalar.StringCalc compileString(Exp exp)
String
result.
The expression is implicitly converted into a scalar.DateTimeCalc compileDateTime(Exp exp)
Date
result.
The expression is implicitly converted into a scalar.ListCalc compileList(Exp exp)
TupleList
result.
Always equivalent to
.compileList(mondrian.olap.Exp)
(exp, false)
ListCalc compileList(Exp exp, boolean mutable)
TupleList
result.
Such an expression is generally a list of Member
objects or a
list of tuples (each represented by a Member
array).
exp
- Expressionmutable
- Whether resulting list is mutableIterCalc compileIter(Exp exp)
Iterable
result.exp
- ExpressionBooleanCalc compileBoolean(Exp exp)
boolean
result.exp
- ExpressionDoubleCalc compileDouble(Exp exp)
double
result.exp
- ExpressionTupleCalc compileTuple(Exp exp)
exp
- ExpressionCalc compileScalar(Exp exp, boolean specific)
If the expression yields a member or tuple, the calculator will automatically apply that member or tuple to the current dimensional context and return the value of the current measure.
exp
- Expressionspecific
- Whether to try to use the specific compile method for
scalar types. For example, if specific
is true and
exp
is a string expression, calls
compileString(mondrian.olap.Exp)
ParameterSlot registerParameter(Parameter parameter)
parameter
- ParameterList<ResultStyle> getAcceptableResultStyles()
ResultStyle
s
acceptable to the caller.Copyright © 2018 Hitachi Vantara. All rights reserved.