|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
org.makumba.analyser.AnalysableTag
org.makumba.commons.tags.GenericMakumbaTag
org.makumba.list.tags.GenericListTag
org.makumba.list.tags.QueryTag
public class QueryTag
Display of OQL query results in nested loops. The Query FROM, WHERE, GROUPBY and ORDERBY are indicated in the head of the tag. The query projections are indicated by Value tags in the body of the tag. The sub-tags will generate subqueries of their enclosing tag queries (i.e. their WHERE, GROUPBY and ORDERBY are concatenated). Attributes of the environment can be passed as $attrName to the query
| Field Summary | |
|---|---|
protected String |
authorize
|
(package private) String |
countVar
|
(package private) String |
editable
|
(package private) String |
editPage
|
(package private) QueryExecution |
execution
|
(package private) String |
limit
|
(package private) String |
logicClass
|
(package private) String |
maxCountVar
|
(package private) String |
offset
|
(package private) static Integer |
one
|
(package private) String[] |
queryProps
|
(package private) String |
separator
|
(package private) static String |
standardCountVar
|
(package private) static String |
standardLastCountVar
|
(package private) static String |
standardMaxCountVar
|
(package private) static String |
standardMaxResultsContext
|
(package private) static String |
standardMaxResultsKey
|
(package private) static String |
standardMaxResultsVar
|
(package private) Object |
upperCount
|
(package private) Object |
upperMaxCount
|
(package private) Object |
upperMaxResults
|
(package private) static Integer |
zero
|
| Fields inherited from class org.makumba.list.tags.GenericListTag |
|---|
fdp |
| Fields inherited from class org.makumba.commons.tags.GenericMakumbaTag |
|---|
extraFormatting, extraFormattingParams, NEEDED_RESOURCES, params |
| Fields inherited from class org.makumba.analyser.AnalysableTag |
|---|
analyzedTag, ATTRIBUTE_VALUES_TRUE_FALSE, runningTag, tagData, tagKey, TYPES |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id, pageContext |
| 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 | |
|---|---|
boolean |
allowsIdenticalKey()
Determines whether the tag can have the same key as others in the page |
static ComposedQuery |
cacheQuery(PageCache pc,
MultipleKey key,
String[] sections,
MultipleKey parentKey)
Gets a composed query from the cache, and if none is found, creates one and caches it. |
boolean |
canHaveBody()
Determines whether this tag can have a body or not. |
static int |
count()
Gives the value of the iteration in progress |
int |
doAfterBody()
Decides whether to do further iterations. |
protected void |
doAnalyzedCleanup()
Called by doEndTag in its finally block. |
int |
doAnalyzedEndTag(PageCache pageCache)
Cleans up variables, especially for the rootList. |
int |
doAnalyzedStartTag(PageCache pageCache)
Decides if there will be any tag iteration. |
void |
doEndAnalyze(PageCache pageCache)
Ends the analysis of the tag, after all tags in the page were visited. |
void |
doStartAnalyze(PageCache pageCache)
Starts the analysis of the tag, without knowing what tags follow it in the page. |
String |
getEditable()
|
String |
getEditPage()
|
int |
getLimitInt()
|
String |
getLogicClass()
|
int |
getOffsetInt()
|
static AnalysableTag |
getParentList(AnalysableTag tag)
Finds the parentList of a list |
static MultipleKey |
getParentListKey(AnalysableTag tag,
PageCache pageCache)
Finds the key of the parentList of the Tag |
static ComposedQuery |
getQuery(PageCache pc,
MultipleKey key)
Gets the query for a given key |
static int |
lastCount()
Gives the total number of iterations of the previous iterationGroup |
static int |
maxCount()
Gives the maximum number of iteration of the iterationGroup |
static int |
maxResults()
Gives the maximum number of results returned as if the query would not contain any limit / offset. |
protected void |
onlyOuterListArgument(String s)
|
void |
setAuthorize(String s)
|
void |
setCountVar(String s)
|
void |
setDefaultLimit(String s)
|
void |
setEditable(String s)
|
void |
setEditPage(String editPage)
|
void |
setFrom(String s)
|
void |
setGroupBy(String s)
|
void |
setLimit(String s)
|
void |
setLogicClass(String logicClass)
|
void |
setMaxCountVar(String s)
|
protected void |
setNumberOfIterations(int n)
Sets the number of iterations in the iterationGroup. |
void |
setOffset(String s)
|
void |
setOrderBy(String s)
|
void |
setSeparator(String s)
|
void |
setTagKey(PageCache pageCache)
Computes and set the tagKey. |
void |
setVariableFrom(String s)
|
void |
setWhere(String s)
|
| Methods inherited from class org.makumba.list.tags.GenericListTag |
|---|
addToParentListKey, doEndTag, getDatabaseName, getDataSourceName, onlyRootArgument, setDb |
| Methods inherited from class org.makumba.commons.tags.GenericMakumbaTag |
|---|
doStartTag, getParams, initialiseState, setAddTitle, setCols, setConvertLinks, setDefault, setElementSeparator, setEllipsis, setEllipsisLength, setEmpty, setFormat, setHtml, setLabelSeparator, setLineSeparator, setLongLineLength, setMaxlength, setMaxLength, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setRows, setSize, setStyle, setStyleClass, setStyleId, setTitle, setType, setType, setUrlEncode, toString |
| Methods inherited from class org.makumba.analyser.AnalysableTag |
|---|
addTagText, checkValidAttributeValues, getAnalyzedTag, getCurrentBodyTag, getPageCache, getPageContext, getPageTextInfo, getRunningTag, getTagKey, getTagText, getThreadTagStack, initializeThread, needPageCache, onlyInt, setTagDataAtAnalysis |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
doEndTag, doStartTag, getParent, release, setPageContext, setParent |
| Field Detail |
|---|
String[] queryProps
String separator
String countVar
String maxCountVar
String offset
String limit
String editable
String logicClass
String editPage
protected String authorize
static String standardCountVar
static String standardMaxCountVar
static String standardLastCountVar
static String standardMaxResultsVar
static String standardMaxResultsContext
static String standardMaxResultsKey
QueryExecution execution
static final Integer zero
static final Integer one
Object upperCount
Object upperMaxCount
Object upperMaxResults
| Constructor Detail |
|---|
public QueryTag()
| Method Detail |
|---|
public void setFrom(String s)
public void setVariableFrom(String s)
public void setWhere(String s)
public void setOrderBy(String s)
public void setGroupBy(String s)
public void setSeparator(String s)
public void setCountVar(String s)
public void setMaxCountVar(String s)
public void setOffset(String s)
throws JspException
JspException
public void setLimit(String s)
throws JspException
JspException
public void setDefaultLimit(String s)
throws JspException
JspExceptionpublic void setAuthorize(String s)
public void setEditable(String s)
public String getLogicClass()
public void setLogicClass(String logicClass)
public String getEditPage()
public void setEditPage(String editPage)
public String getEditable()
public int getLimitInt()
public int getOffsetInt()
protected void onlyOuterListArgument(String s)
throws JspException
JspExceptionpublic void setTagKey(PageCache pageCache)
setTagKey in class AnalysableTagpageCache - The page cache for the current pageAnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache),
AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)public boolean allowsIdenticalKey()
allowsIdenticalKey in class AnalysableTagtrue if the tag is allowed to have the same key as others in the page, false
otherwisepublic void doStartAnalyze(PageCache pageCache)
doStartAnalyze in class AnalysableTagpageCache - The page cache for the current pagepublic void doEndAnalyze(PageCache pageCache)
doEndAnalyze in class AnalysableTagpageCache - The page cache for the current page
public int doAnalyzedStartTag(PageCache pageCache)
throws LogicException,
JspException
doAnalyzedStartTag in class AnalysableTagpageCache - The page cache for the current page
Tag interface
LogicException
JspExceptionQueryExecution
protected void setNumberOfIterations(int n)
throws JspException
n - The number of iterations in the iterationGroup
JspExceptionObjectTag
public int doAfterBody()
throws JspException
doAfterBody in interface IterationTagdoAfterBody in class TagSupportTag interface
JspException
public int doAnalyzedEndTag(PageCache pageCache)
throws JspException
doAnalyzedEndTag in class AnalysableTagpageCache - The page cache for the current page
Tag interface in order to
continue evaluating the page.
JspExceptionAnalysableTag.doEndTag()public static AnalysableTag getParentList(AnalysableTag tag)
tag - the tag we want to discover the parent of
public static MultipleKey getParentListKey(AnalysableTag tag,
PageCache pageCache)
tag - the tag we want to discover the parent ofpageCache - the pageCache of the current page
public static ComposedQuery getQuery(PageCache pc,
MultipleKey key)
key - the key of the tag for which we want to get a query
public static ComposedQuery cacheQuery(PageCache pc,
MultipleKey key,
String[] sections,
MultipleKey parentKey)
key - the key of the tagsections - the sections needed to compose a queryparentKey - the key of the parent tag, if anypublic static int count()
public static int maxCount()
public static int maxResults()
public static int lastCount()
public boolean canHaveBody()
AnalysableTag
canHaveBody in class AnalysableTagtrue if the tag is allowed to have a body, false
otherwiseprotected void doAnalyzedCleanup()
AnalysableTag
doAnalyzedCleanup in class GenericMakumbaTag
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||