com.caucho.jstl.rt
Class SqlQueryTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.caucho.jstl.rt.SqlQueryTag
All Implemented Interfaces:
java.io.Serializable, SQLExecutionTag, BodyTag, IterationTag, JspTag, Tag

public class SqlQueryTag
extends BodyTagSupport
implements SQLExecutionTag

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
SqlQueryTag()
           
 
Method Summary
 void addSQLParameter(java.lang.Object value)
          Adds a parameter.
 int doEndTag()
          Processed at the end of the tag.
static java.sql.Connection getConnection(PageContext pageContext, java.lang.Object ds)
           
static javax.sql.DataSource getDataSource(PageContext pageContext, java.lang.Object ds)
           
 void setDataSource(java.lang.Object dataSource)
          Sets the data source.
 void setMaxRows(int maxRows)
          Sets the maximum number of rows.
 void setScope(java.lang.String scope)
          Sets the scope.
 void setSql(java.lang.String sql)
          Sets the SQL.
 void setStartRow(int startRow)
          Sets the start row.
 void setVar(java.lang.String var)
          Sets the variable name.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, 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

SqlQueryTag

public SqlQueryTag()
Method Detail

setSql

public void setSql(java.lang.String sql)
Sets the SQL.


setVar

public void setVar(java.lang.String var)
Sets the variable name.


setScope

public void setScope(java.lang.String scope)
Sets the scope.


setDataSource

public void setDataSource(java.lang.Object dataSource)
                   throws JspException
Sets the data source.

Throws:
JspException

setMaxRows

public void setMaxRows(int maxRows)
                throws JspException
Sets the maximum number of rows.

Throws:
JspException

setStartRow

public void setStartRow(int startRow)
Sets the start row.


addSQLParameter

public void addSQLParameter(java.lang.Object value)
Adds a parameter.

Specified by:
addSQLParameter in interface SQLExecutionTag

doEndTag

public int doEndTag()
             throws JspException
Description copied from class: TagSupport
Processed at the end of the tag. The default behavior continues with the rest of the JSP.

Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class TagSupport
Returns:
EVAL_PAGE to continue the page SKIP_PAGE to stop.
Throws:
JspException

getDataSource

public static javax.sql.DataSource getDataSource(PageContext pageContext,
                                                 java.lang.Object ds)
                                          throws JspException
Throws:
JspException

getConnection

public static java.sql.Connection getConnection(PageContext pageContext,
                                                java.lang.Object ds)
                                         throws JspException
Throws:
JspException