|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport org.makumba.analyser.AnalysableElement 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
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.makumba.analyser.AnalysableElement |
---|
AnalysableElement.FilePositionElementComparator |
Field Summary | |
---|---|
protected String |
authorize
|
(package private) String |
countVar
|
(package private) String |
editable
|
(package private) String |
editPage
|
(package private) QueryExecution |
execution
|
(package private) static String |
lastFinishedListKey
|
(package private) String |
limit
|
(package private) String |
logicClass
|
(package private) String |
maxCountVar
|
(package private) String |
offset
|
(package private) static Integer |
one
|
(package private) static String |
queryExecuted
|
(package private) String[] |
queryProps
|
(package private) static String |
runningListKeyStack
|
(package private) String |
separator
|
(package private) static String |
standardCountVar
|
(package private) static String |
standardLastCountVar
|
(package private) static String |
standardMaxCountVar
|
(package private) static String |
standardMaxResultsKey
|
(package private) static String |
standardMaxResultsVar
|
(package private) static String |
standardNextCountVar
|
(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 |
---|
ATTRIBUTE_VALUES_TRUE_FALSE, tagData, tagKey, TYPES |
Fields inherited from class org.makumba.analyser.AnalysableElement |
---|
ANALYSIS_STATE |
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. |
int |
getCurrentIterationNumber()
Gets the number of the current iteration |
String |
getEditable()
|
String |
getEditPage()
|
int |
getLimitInt()
|
String |
getLogicClass()
|
int |
getNumberOfIterations()
Gets the number of iterations of this list |
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 Stack<MultipleKey> |
getRunningQueryTagStack(PageContext pageContext)
Gets the stack of currently running (nested) Query Tags from the pageContext |
static int |
lastCount()
Gives the total number of iterations of the previous iterationGroup |
static int |
lastCountById(String id)
Gives the total number of iterations of the iterationGroup identified by the given ID string |
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. |
static int |
nextCount()
Gives the total number of iterations of the next iterationGroup. |
static int |
nextCountById(String id)
Gives the total number of iterations of the next iterationGroup. |
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, isAttribute, setAddTitle, setCols, 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, checkAttributeValues, getElementData, getPageContext, getPageTextInfo, getTagKey, getTagText, needPageCache, notEmpty, onlyInt, registerAttributeValues, registerPossibleAttributeValues, setTagDataAtAnalysis |
Methods inherited from class org.makumba.analyser.AnalysableElement |
---|
checkTagFound, discardJSPParsingData, getAnalyzedElementData, getCurrentBodyTagData, getElementAfter, getElementBefore, getPageCache, getPageCache, getRunningElementData, getTagByAttribute, getTagById, getThreadElementStack, initializeThread, keepAnalysisState, setAnalyzedElementData, setRunningElementData |
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 standardNextCountVar
static String standardMaxResultsVar
static String standardMaxResultsKey
static String lastFinishedListKey
static String runningListKeyStack
static String queryExecuted
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
JspException
public 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
JspException
public void setTagKey(PageCache pageCache)
setTagKey
in class AnalysableTag
pageCache
- The page cache for the current pageAnalysableTag.doAnalyzedStartTag(org.makumba.analyser.PageCache)
,
AnalysableTag.doStartAnalyze(org.makumba.analyser.PageCache)
public boolean allowsIdenticalKey()
allowsIdenticalKey
in class AnalysableTag
true
if the tag is allowed to have the same key as others in the page, false
otherwisepublic void doStartAnalyze(PageCache pageCache)
doStartAnalyze
in class AnalysableTag
pageCache
- The page cache for the current pagepublic void doEndAnalyze(PageCache pageCache)
doEndAnalyze
in class AnalysableTag
pageCache
- The page cache for the current pagepublic int doAnalyzedStartTag(PageCache pageCache) throws LogicException, JspException
initiateQueryExecution(PageContext, boolean)
and
doTagExecution(PageCache, PageContext)
doAnalyzedStartTag
in class AnalysableTag
pageCache
- The page cache for the current page
Tag
interface
LogicException
JspException
QueryExecution
protected void setNumberOfIterations(int n) throws JspException
n
- The number of iterations in the iterationGroup
JspException
ObjectTag
public int getNumberOfIterations()
public int getCurrentIterationNumber()
public int doAfterBody() throws JspException
doAfterBody
in interface IterationTag
doAfterBody
in class TagSupport
Tag
interface
JspException
public int doAnalyzedEndTag(PageCache pageCache) throws JspException
doAnalyzedEndTag
in class AnalysableTag
pageCache
- The page cache for the current page
Tag
interface in order to
continue evaluating the page.
JspException
AnalysableTag.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 static int lastCountById(String id)
id
- the id of the mak:list or mak:object tag to relate to
public static int nextCount() throws LogicException, JspException
LogicException
JspException
public static int nextCountById(String id) throws LogicException, JspException
id
- the ID of the mak:list/object to relate to
LogicException
JspException
public static Stack<MultipleKey> getRunningQueryTagStack(PageContext pageContext)
public boolean canHaveBody()
AnalysableTag
canHaveBody
in class AnalysableTag
true
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 |