|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Validator
Provides context necessary to resolve identifiers to objects, function calls to specific functions.
An expression calls validate(mondrian.olap.Exp, boolean)
on each of its children,
which in turn calls Exp.accept(mondrian.olap.Validator)
.
Method Summary | |
---|---|
boolean |
canConvert(Exp fromExp,
int to,
int[] conversionCount)
Returns whether we can convert an argument to a parameter type. |
Parameter |
createOrLookupParam(boolean definition,
String name,
Type type,
Exp defaultExp,
String description)
Creates or retrieves the parameter corresponding to a "Parameter" or "ParamRef" function call. |
FunTable |
getFunTable()
Returns the table of function and operator definitions. |
Query |
getQuery()
Returns the Query which is being validated. |
boolean |
requiresExpression()
Returns whether the current context requires an expression. |
Exp |
validate(Exp exp,
boolean scalar)
Validates an expression, and returns the expression it resolves to. |
void |
validate(Formula formula)
Validates a formula. |
void |
validate(MemberProperty memberProperty)
Validates a child member property. |
void |
validate(ParameterExpr parameterExpr)
Validates a usage of a parameter. |
void |
validate(QueryAxis axis)
Validates an axis. |
Method Detail |
---|
Query getQuery()
Query
which is being validated.
Exp validate(Exp exp, boolean scalar)
exp
- Expression to validatescalar
- Whether the context requires that the expression is
evaluated to a value, as opposed to a tuplevoid validate(ParameterExpr parameterExpr)
It must resolve to the same object (although sub-objects may change).
void validate(MemberProperty memberProperty)
It must resolve to the same object (although sub-objects may change).
void validate(QueryAxis axis)
void validate(Formula formula)
boolean requiresExpression()
boolean canConvert(Exp fromExp, int to, int[] conversionCount)
fromExp
- argument typeto
- parameter typeconversionCount
- in/out count of number of conversions performed;
is incremented if the conversion is non-trivial (for
example, converting a member to a level).FunTable getFunTable()
Parameter createOrLookupParam(boolean definition, String name, Type type, Exp defaultExp, String description)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |