|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.calc.impl.DelegatingExpCompiler
public class DelegatingExpCompiler
Abstract implementation of ExpCompiler
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface mondrian.calc.ExpCompiler |
|---|
ExpCompiler.Factory |
| Constructor Summary | |
|---|---|
protected |
DelegatingExpCompiler(ExpCompiler parent)
|
| Method Summary | |
|---|---|
protected Calc |
afterCompile(Exp exp,
Calc calc,
boolean mutable)
Hook for post-processing. |
Calc |
compile(Exp exp)
Compiles an expression. |
Calc |
compileAs(Exp exp,
Type resultType,
List<ResultStyle> preferredResultTypes)
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 scalar)
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 ResultStyles
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DelegatingExpCompiler(ExpCompiler parent)
| Method Detail |
|---|
protected Calc afterCompile(Exp exp,
Calc calc,
boolean mutable)
exp - Expression to compilecalc - Calculator created by compilermutable - Whether the result is mutuable
public Evaluator getEvaluator()
ExpCompiler
getEvaluator in interface ExpCompilerpublic Validator getValidator()
ExpCompiler
getValidator in interface ExpCompilerpublic Calc compile(Exp exp)
ExpCompiler
compile in interface ExpCompilerexp - Expression
public Calc compileAs(Exp exp,
Type resultType,
List<ResultStyle> preferredResultTypes)
ExpCompilerIf 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.
compileAs in interface ExpCompilerexp - ExpressionresultType - Desired result type, or null to use expression's
current typepreferredResultTypes - List of result types, in descending order
of preference. Never null.
public MemberCalc compileMember(Exp exp)
ExpCompilerMember result.
compileMember in interface ExpCompilerpublic LevelCalc compileLevel(Exp exp)
ExpCompilerLevel result.
compileLevel in interface ExpCompilerpublic DimensionCalc compileDimension(Exp exp)
ExpCompilerDimension result.
compileDimension in interface ExpCompilerpublic HierarchyCalc compileHierarchy(Exp exp)
ExpCompilerHierarchy result.
compileHierarchy in interface ExpCompilerpublic IntegerCalc compileInteger(Exp exp)
ExpCompilerint result.
The expression is implicitly converted into a scalar.
compileInteger in interface ExpCompilerpublic StringCalc compileString(Exp exp)
ExpCompilerString result.
The expression is implicitly converted into a scalar.
compileString in interface ExpCompilerpublic DateTimeCalc compileDateTime(Exp exp)
ExpCompilerDate result.
The expression is implicitly converted into a scalar.
compileDateTime in interface ExpCompilerpublic final ListCalc compileList(Exp exp)
ExpCompilerTupleList
result.
Always equivalent to .
ExpCompiler.compileList(mondrian.olap.Exp)(exp, false)
compileList in interface ExpCompiler
public ListCalc compileList(Exp exp,
boolean mutable)
ExpCompilerTupleList result.
Such an expression is generally a list of Member objects or a
list of tuples (each represented by a Member array).
See ExpCompiler.compileList(mondrian.olap.Exp).
compileList in interface ExpCompilerexp - Expressionmutable - Whether resulting list is mutablepublic IterCalc compileIter(Exp exp)
ExpCompilerIterable result.
compileIter in interface ExpCompilerexp - Expression
public BooleanCalc compileBoolean(Exp exp)
ExpCompilerboolean result.
compileBoolean in interface ExpCompilerexp - Expression
public DoubleCalc compileDouble(Exp exp)
ExpCompilerdouble result.
compileDouble in interface ExpCompilerexp - Expression
public TupleCalc compileTuple(Exp exp)
ExpCompiler
compileTuple in interface ExpCompilerexp - Expression
public Calc compileScalar(Exp exp,
boolean scalar)
ExpCompilerIf 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.
compileScalar in interface ExpCompilerexp - Expressionscalar - 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
ExpCompiler.compileString(mondrian.olap.Exp)
public ParameterSlot registerParameter(Parameter parameter)
ExpCompiler
registerParameter in interface ExpCompilerparameter - Parameter
public List<ResultStyle> getAcceptableResultStyles()
ExpCompilerResultStyles
acceptable to the caller.
getAcceptableResultStyles in interface ExpCompiler
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||