📄 evaluator.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_15) on Thu Jul 31 17:20:07 EDT 2008 --><TITLE>Evaluator (Mondrian OLAP Server, version 3.0.4.11371)</TITLE><META NAME="keywords" CONTENT="mondrian.olap.Evaluator interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Evaluator (Mondrian OLAP Server, version 3.0.4.11371)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../mondrian/olap/EnumeratedValues.Value.html" title="interface in mondrian.olap"><B>PREV CLASS</B></A> <A HREF="../../mondrian/olap/Exp.html" title="interface in mondrian.olap"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?mondrian/olap/Evaluator.html" target="_top"><B>FRAMES</B></A> <A HREF="Evaluator.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">mondrian.olap</FONT><BR>Interface Evaluator</H2><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../mondrian/rolap/RolapDependencyTestingEvaluator.html" title="class in mondrian.rolap">RolapDependencyTestingEvaluator</A>, <A HREF="../../mondrian/rolap/RolapEvaluator.html" title="class in mondrian.rolap">RolapEvaluator</A></DD></DL><HR><DL><DT><PRE>public interface <B>Evaluator</B></DL></PRE><P>An <code>Evaluator</code> holds the context necessary to evaluate an expression.<P><P><DL><DT><B>Since:</B></DT> <DD>27 July, 2001</DD><DT><B>Version:</B></DT> <DD>$Id: //open/mondrian-release/3.0/src/main/mondrian/olap/Evaluator.java#3 $</DD><DT><B>Author:</B></DT> <DD>jhyde</DD></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#evaluateCurrent()">evaluateCurrent</A></B>()</CODE><BR> Calculates and returns the value of the cell at the current context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#evaluateNamedSet(java.lang.String, mondrian.olap.Exp)">evaluateNamedSet</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="../../mondrian/olap/Exp.html" title="interface in mondrian.olap">Exp</A> exp)</CODE><BR> Evaluates a named set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#format(java.lang.Object)">format</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o)</CODE><BR> Formats a value as a string according to the current context's format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#format(java.lang.Object, java.lang.String)">format</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> o, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> formatString)</CODE><BR> Formats a value as a string according to the current context's format, using a given format string.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getCachedResult(mondrian.olap.ExpCacheDescriptor)">getCachedResult</A></B>(<A HREF="../../mondrian/olap/ExpCacheDescriptor.html" title="class in mondrian.olap">ExpCacheDescriptor</A> key)</CODE><BR> Simple caching of the result of an <code>Exp</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getConnectionLocale()">getConnectionLocale</A></B>()</CODE><BR> Returns the connection's locale.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Member.html" title="interface in mondrian.olap">Member</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getContext(mondrian.olap.Dimension)">getContext</A></B>(<A HREF="../../mondrian/olap/Dimension.html" title="interface in mondrian.olap">Dimension</A> dimension)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Cube.html" title="interface in mondrian.olap">Cube</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getCube()">getCube</A></B>()</CODE><BR> Returns the current cube.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getDepth()">getDepth</A></B>()</CODE><BR> Returns number of ancestor evaluators.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getFormatString()">getFormatString</A></B>()</CODE><BR> Returns the format string for this cell.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getIterationLength()">getIterationLength</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Cube.html" title="interface in mondrian.olap">Cube</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getMeasureCube()">getMeasureCube</A></B>()</CODE><BR> Returns the base (non-virtual) cube that the current measure in the context belongs to.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Member.html" title="interface in mondrian.olap">Member</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getMembers()">getMembers</A></B>()</CODE><BR> Returns an array of the members which make up the current context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getMissCount()">getMissCount</A></B>()</CODE><BR> Returns the number of times that this evaluator has told a lie when retrieving cell values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getParameterValue(mondrian.calc.ParameterSlot)">getParameterValue</A></B>(<A HREF="../../mondrian/calc/ParameterSlot.html" title="interface in mondrian.calc">ParameterSlot</A> slot)</CODE><BR> Returns the value of a parameter, evaluating its default value if it is not set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Evaluator.html" title="interface in mondrian.olap">Evaluator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getParent()">getParent</A></B>()</CODE><BR> Returns parent evaluator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getProperty(java.lang.String, java.lang.Object)">getProperty</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> defaultValue)</CODE><BR> Retrieves the value of property <code>name</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Query.html" title="class in mondrian.olap">Query</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getQuery()">getQuery</A></B>()</CODE><BR> Returns the current query.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getQueryStartTime()">getQueryStartTime</A></B>()</CODE><BR> Returns the start time of the current query.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/SchemaReader.html" title="interface in mondrian.olap">SchemaReader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#getSchemaReader()">getSchemaReader</A></B>()</CODE><BR> Returns a <A HREF="../../mondrian/olap/SchemaReader.html" title="interface in mondrian.olap"><CODE>SchemaReader</CODE></A> appropriate for the current access-control context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#isEvalAxes()">isEvalAxes</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#isNonEmpty()">isNonEmpty</A></B>()</CODE><BR> Returns true for an axis that is NON EMPTY.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#needToReturnNullForUnrelatedDimension(mondrian.olap.Member[])">needToReturnNullForUnrelatedDimension</A></B>(<A HREF="../../mondrian/olap/Member.html" title="interface in mondrian.olap">Member</A>[] members)</CODE><BR> If IgnoreMeasureForNonJoiningDimension is set to true and one or more members are on unrelated dimension for the measure in current context then returns true.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/RuntimeException.html" title="class or interface in java.lang">RuntimeException</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#newEvalException(java.lang.Object, java.lang.String)">newEvalException</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> context, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE><BR> Creates an exception which indicates that an error has occurred during the runtime evaluation of a function.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Evaluator.html" title="interface in mondrian.olap">Evaluator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#pop()">pop</A></B>()</CODE><BR> Restores previous evaluator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../mondrian/olap/Evaluator.html" title="interface in mondrian.olap">Evaluator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../mondrian/olap/Evaluator.html#push()">push</A></B>()</CODE><BR> Creates a new Evaluator with the same context as this evaluator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -