|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Evaluator
An Evaluator
holds the context necessary to evaluate an
expression.
Method Summary | |
---|---|
Object |
evaluateCurrent()
Calculates and returns the value of the cell at the current context. |
Object |
evaluateNamedSet(String name,
Exp exp)
Evaluates a named set. |
String |
format(Object o)
Formats a value as a string according to the current context's format. |
String |
format(Object o,
String formatString)
Formats a value as a string according to the current context's format, using a given format string. |
Object |
getCachedResult(ExpCacheDescriptor key)
Simple caching of the result of an Exp . |
Locale |
getConnectionLocale()
Returns the connection's locale. |
Member |
getContext(Dimension dimension)
|
Cube |
getCube()
Returns the current cube. |
int |
getDepth()
Returns number of ancestor evaluators. |
String |
getFormatString()
Returns the format string for this cell. |
int |
getIterationLength()
|
Cube |
getMeasureCube()
Returns the base (non-virtual) cube that the current measure in the context belongs to. |
Member[] |
getMembers()
Returns an array of the members which make up the current context. |
int |
getMissCount()
Returns the number of times that this evaluator has told a lie when retrieving cell values. |
Object |
getParameterValue(ParameterSlot slot)
Returns the value of a parameter, evaluating its default value if it is not set. |
Evaluator |
getParent()
Returns parent evaluator. |
Object |
getProperty(String name,
Object defaultValue)
Retrieves the value of property name . |
Query |
getQuery()
Returns the current query. |
Date |
getQueryStartTime()
Returns the start time of the current query. |
SchemaReader |
getSchemaReader()
Returns a SchemaReader appropriate for the current
access-control context. |
boolean |
isEvalAxes()
|
boolean |
isNonEmpty()
Returns true for an axis that is NON EMPTY. |
boolean |
needToReturnNullForUnrelatedDimension(Member[] members)
If IgnoreMeasureForNonJoiningDimension is set to true and one or more members are on unrelated dimension for the measure in current context then returns true. |
RuntimeException |
newEvalException(Object context,
String s)
Creates an exception which indicates that an error has occurred during the runtime evaluation of a function. |
Evaluator |
pop()
Restores previous evaluator. |
Evaluator |
push()
Creates a new Evaluator with the same context as this evaluator. |
Evaluator |
push(Member member)
Creates a new Evaluator with the same context except for one member. |
Evaluator |
push(Member[] members)
Creates a new Evaluator with each given member overriding the context of the current Evaluator for its dimension. |
Evaluator |
pushAggregation(List<Member[]> list)
Returns a new Aggregator whose aggregation context adds a given list of tuples, and whose dimensional context is the same as this Aggregator. |
void |
setContext(List<Member> memberList)
|
Member |
setContext(Member member)
Makes member the current member of its dimension. |
void |
setContext(Member[] members)
|
void |
setEvalAxes(boolean evalAxes)
Indicate whether the evaluator is evaluating the axes |
void |
setIterationLength(int length)
Sets the iteration length for the current evaluator context |
void |
setNonEmpty(boolean nonEmpty)
Sets whether an expression evaluation should filter out empty cells. |
boolean |
shouldIgnoreUnrelatedDimensions()
Checks if unrelated dimensions to the measure in the current context should be ignored |
Method Detail |
---|
Cube getCube()
Query getQuery()
Date getQueryStartTime()
Evaluator push(Member[] members)
You can retrieve this Evaluator by calling the new Evaluator's
pop()
method, but it is not necessary to call pop
.
members
- Array of members to add to the context
Evaluator push()
push(new Member[0])
.
This method is typically called before evaluating an expression which is known to corrupt the evaluation context.
You can retrieve this Evaluator by calling the new Evaluator's
pop()
method, but it is not necessary to call pop
.
Evaluator push(Member member)
push(new Member[] |member})
.
You can retrieve this Evaluator by calling the new Evaluator's
pop()
method, but it is not necessary to call pop
.
member
- Member to add to the context
Evaluator pop()
Member setContext(Member member)
member
the current member of its dimension. Returns
the previous context.
void setContext(List<Member> memberList)
void setContext(Member[] members)
Member getContext(Dimension dimension)
Object evaluateCurrent()
String getFormatString()
String format(Object o)
String format(Object o, String formatString)
int getDepth()
Evaluator getParent()
Locale getConnectionLocale()
Object getProperty(String name, Object defaultValue)
name
. If more than one
member in the current context defines that property, the one with the
highest solve order has precedence.
If the property is not defined, default value is returned.
SchemaReader getSchemaReader()
SchemaReader
appropriate for the current
access-control context.
Object getCachedResult(ExpCacheDescriptor key)
Exp
. The
key for the cache consists of all members of the current
context that exp
depends on. Members of
independent dimensions are not part of the key.
Calc.dependsOn(mondrian.olap.Dimension)
boolean isNonEmpty()
May be used by expression evaluators to optimize their result. For example, a top-level crossjoin may be optimized by removing all non-empty set elements before performing the crossjoin. This is possible because of the identity
nonempty(crossjoin(a, b)) ==
nonempty(crossjoin(nonempty(a), nonempty(b));
void setNonEmpty(boolean nonEmpty)
RuntimeException newEvalException(Object context, String s)
Object evaluateNamedSet(String name, Exp exp)
Member[] getMembers()
int getMissCount()
Object getParameterValue(ParameterSlot slot)
int getIterationLength()
void setIterationLength(int length)
length
- length to be setboolean isEvalAxes()
void setEvalAxes(boolean evalAxes)
evalAxes
- true if evaluating axesEvaluator pushAggregation(List<Member[]> list)
list
- List of tuples
list
added to its aggregation
contextboolean shouldIgnoreUnrelatedDimensions()
Cube getMeasureCube()
boolean needToReturnNullForUnrelatedDimension(Member[] members)
members
- dimensions for the members need to be checked whether
related or unrelated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |