mondrian.web.taglib
public class QueryTag extends BodyTagSupport
QueryTag
creates a ResultCache
object and initializes
it with the MDX query. Example:Attributes are<query name="query1" resultCache="true"> select {[Measures].[Unit Sales], [Measures].[Store Cost]} on columns, CrossJoin( { [Promotion Media].[Radio], [Promotion Media].[TV], [Promotion Media].[Sunday Paper], [Promotion Media].[Street Handout] }, [Product].[Drink].children) on rows from Sales where ([Time].[1997]) </query>
name
,
resultCache
.bodyContent
id, pageContext
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
EVAL_BODY_AGAIN
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
Constructor and Description |
---|
QueryTag() |
Modifier and Type | Method and Description |
---|---|
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. |
doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParent, setPageContext, setParent
public int doAfterBody() throws JspException
doAfterBody
in interface IterationTag
doAfterBody
in class BodyTagSupport
JspException
public void setName(String newName)
name
, which identifies this query
within its page. The <transform
query>
attribute uses this.public String getName()
public void setResultCache(boolean newResultCache)
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.public boolean isResultCache()