|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExpCompiler
Mediates the compilation of an expression (Exp
)
into a compiled expression (Calc
).
Nested Class Summary | |
---|---|
static class |
ExpCompiler.Factory
The ExpCompiler.Factory is used to access
ExpCompiler implementations. |
Method Summary | |
---|---|
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 List
result. |
ListCalc |
compileList(Exp exp,
boolean mutable)
Compiles an expression which yields List 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. |
Method Detail |
---|
Evaluator getEvaluator()
Validator getValidator()
Calc compile(Exp exp)
exp
- Expression
Calc 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.
LevelCalc compileLevel(Exp exp)
Level
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)
List
result.
Always equivalent to
.
compileList(mondrian.olap.Exp)
(exp, false)
ListCalc compileList(Exp exp, boolean mutable)
List
result.
Such an expression is generally a list of Member
objects or a
list of tuples (each represented by a Member
array).
See compileList(mondrian.olap.Exp)
.
exp
- Expressionmutable
- Whether resulting list is mutableIterCalc compileIter(Exp exp)
Iterable
result.
exp
- Expression
BooleanCalc compileBoolean(Exp exp)
boolean
result.
exp
- Expression
DoubleCalc compileDouble(Exp exp)
double
result.
exp
- Expression
TupleCalc compileTuple(Exp exp)
exp
- Expression
Calc 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
- Parameter
List<ResultStyle> getAcceptableResultStyles()
ResultStyle
s
acceptable to the caller.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |