org.apache.taglibs.dbtags.statement
Interface StatementTag

All Known Implementing Classes:
PreparedStatementImplTag, StatementImplTag

public interface StatementTag

Interface for StatementImplTag and PreparedStatementImplTag. Used to mask the differences between statements and preparedstatements in this taglib.

Author:
Morgan Delagrange
See Also:
StatementImplTag, PreparedStatementImplTag, QueryTag, ExecuteTag, ResultSetTag

Method Summary
 java.sql.ResultSet executeQuery()
          Execute a SQL select
 void executeUpdate()
          Execute a SQL insert, update or delete.
 void setConn(java.lang.String connId)
          The id of a page context attribute containing a java.sql.Connection
 void setQuery(java.lang.String query)
          SQL query to be executed in the statement
 

Method Detail

setQuery

public void setQuery(java.lang.String query)
              throws java.sql.SQLException,
                     javax.servlet.jsp.JspTagException
SQL query to be executed in the statement

Parameters:
query - SQL query
Throws:
java.sql.SQLException - throws an exception when a PreparedStatement cannot be created
javax.servlet.jsp.JspTagException

setConn

public void setConn(java.lang.String connId)
The id of a page context attribute containing a java.sql.Connection

Parameters:
connId - id of the Connection attribute
See Also:
ConnectionTag

executeUpdate

public void executeUpdate()
                   throws java.sql.SQLException
Execute a SQL insert, update or delete.

Throws:
java.sql.SQLException

executeQuery

public java.sql.ResultSet executeQuery()
                                throws java.sql.SQLException
Execute a SQL select

Returns:
Resultset based on the query
Throws:
java.sql.SQLException


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.