mondrian.web.taglib
Class QueryTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by mondrian.web.taglib.QueryTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class QueryTag
extends BodyTagSupport

A QueryTag creates a ResultCache object and initializes it with the MDX query. Example:

<query name="query1" resultCache="true">
 select
   {[Measures].[Unit Sales], [Measures].[Store Cost]} on columns,
   CrossJoin(
     { [Promotion Media].[All Promotion Media].[Radio],
       [Promotion Media].[All Promotion Media].[TV],
       [Promotion Media].[All Promotion Media].[Sunday Paper],
       [Promotion Media].[All Promotion Media].[Street Handout] },
     [Product].[All Products].[Drink].children) on rows
 from Sales
 where ([Time].[1997])
 </query>
Attributes are name, resultCache.

See Also:
Serialized Form
 

Field Summary
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
QueryTag()
           
 
Method Summary
 int doAfterBody()
           
 String getName()
           
 boolean isResultCache()
           
 void setName(String newName)
          Sets string attribute name, which identifies this query within its page.
 void setResultCache(boolean newResultCache)
          Sets boolean attribute resultCache; if true, the query is parsed, executed, and converted to an XML document at most once.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Constructor Detail

QueryTag

public QueryTag()
Method Detail

doAfterBody

public int doAfterBody()
                throws JspException
Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Throws:
JspException

setName

public void setName(String newName)
Sets string attribute name, which identifies this query within its page. The <transform query> attribute uses this.


getName

public String getName()

setResultCache

public void setResultCache(boolean newResultCache)
Sets boolean attribute resultCache; if true, the query is parsed, executed, and converted to an XML document at most once. This improves performance and consistency, but the results may become out of date. We also need a way to prevent the cache using too much memory.


isResultCache

public boolean isResultCache()

SourceForge.net_Logo