net.ontopia.topicmaps.nav2.taglibs.tolog
Class QueryWrapper

java.lang.Object
  extended by net.ontopia.topicmaps.nav2.taglibs.tolog.QueryWrapper

public class QueryWrapper
extends Object

INTERNAL: Generic Tolog Tag that has support for executing one query.


Field Summary
protected  ArrayList lookAhead
           
 
Constructor Summary
QueryWrapper(javax.servlet.jsp.PageContext pageContext, String inQuery)
          Default constructor.
 
Method Summary
protected  void bindVariables(boolean[] groupColumns)
          Bind (some of) the names of the columns of the result to the current row.
protected  boolean equalGroup(boolean[] groupColumns, Object[] row1, Object[] row2)
           
protected  boolean fullyGrouped()
           
 ContextManagerIF getContextManager()
           
 Object[] getCurrentRow()
           
 int getIndex(String columnName)
           
 String getQuery()
           
 int getWidth()
           
 boolean hasNext()
           
protected  boolean isOnlyChild(boolean[] parentGroupColumns, boolean[] childGroupColumns)
           
 void next()
          Moves one step forward in the result set of the query.
 ParsedQueryIF parseQuery()
           
protected  boolean relevantDifferences(boolean[] groupColumns)
           
protected  void setUsedBy(ForEachTag user)
           
protected  void updateTotalGroupBy(boolean[] groupBy)
           
protected  boolean usedBy(ForEachTag user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lookAhead

protected ArrayList lookAhead
Constructor Detail

QueryWrapper

public QueryWrapper(javax.servlet.jsp.PageContext pageContext,
                    String inQuery)
             throws NavigatorRuntimeException
Default constructor. Creates executes the inputQuery in the given PageContext and moves to the first row.

Throws:
NavigatorRuntimeException
Method Detail

updateTotalGroupBy

protected void updateTotalGroupBy(boolean[] groupBy)

setUsedBy

protected void setUsedBy(ForEachTag user)

usedBy

protected boolean usedBy(ForEachTag user)

fullyGrouped

protected boolean fullyGrouped()

relevantDifferences

protected boolean relevantDifferences(boolean[] groupColumns)
Returns:
true if the query result has changed with respect in any of the columns corresponding to the entries of groupColumns. This happens iff for any particular index diffs and groupColumns both contain the value true.

getContextManager

public ContextManagerIF getContextManager()

hasNext

public boolean hasNext()

next

public void next()
Moves one step forward in the result set of the query.


getCurrentRow

public Object[] getCurrentRow()

getWidth

public int getWidth()

getIndex

public int getIndex(String columnName)

getQuery

public String getQuery()

parseQuery

public ParsedQueryIF parseQuery()
                         throws NavigatorRuntimeException
Throws:
NavigatorRuntimeException

bindVariables

protected void bindVariables(boolean[] groupColumns)
                      throws javax.servlet.jsp.JspTagException
Bind (some of) the names of the columns of the result to the current row. Only bind those columns corresponding to a true entry in groupColumns. e.g. column 3 is bound if groupColumns[3] is true.

Throws:
javax.servlet.jsp.JspTagException

isOnlyChild

protected boolean isOnlyChild(boolean[] parentGroupColumns,
                              boolean[] childGroupColumns)

equalGroup

protected boolean equalGroup(boolean[] groupColumns,
                             Object[] row1,
                             Object[] row2)


Copyright © 2000-2012 Ontopia.