当前页面:
在线文档首页 >
JBoss 3.2.7 server API Documentation 英文版文档
JDBCQueryCommand (JBoss Server API) - JBoss 3.2.7 server API Documentation 英文版文档
org.jboss.ejb.plugins.jaws.jdbc
Class JDBCQueryCommand
java.lang.Object
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand
org.jboss.ejb.plugins.jaws.jdbc.JDBCQueryCommand
- Direct Known Subclasses:
- JDBCBeanExistsCommand, JDBCFinderCommand, JDBCLoadEntityCommand
- public abstract class JDBCQueryCommand
- extends JDBCCommand
Abstract superclass for all JAWS Commands that issue JDBC queries
directly.
Provides a Template Method implementation for
executeStatementAndHandleResult
.
- Version:
- $Revision: 1.8 $
- Author:
- Justin Forder
Methods inherited from class org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand |
getCMPFieldValue, getConnection, getJawsCMPFieldJDBCType, getJDBCType, getJDBCTypeName, getName, getPkColumnList, getPkColumnWhereList, getPkFieldValue, getResultObject, getResultObject, getSQL, getState, isBinaryType, jdbcExecute, setCMPFieldValue, setParameter, setParameters, setPrimaryKeyParameters, setSQL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCQueryCommand
protected JDBCQueryCommand(JDBCCommandFactory factory,
String name)
- Pass the arguments on to the superclass constructor.
executeStatementAndHandleResult
protected Object executeStatementAndHandleResult(PreparedStatement stmt,
Object argOrArgs)
throws Exception
- Template Method that executes the PreparedStatement and calls
handleResult
on the resulting ResultSet.
- Specified by:
executeStatementAndHandleResult
in class JDBCCommand
- Parameters:
stmt
- the prepared statement, with its parameters already set.argOrArgs
- argument or array of arguments passed in from
subclass execute method.
- Returns:
- any result produced by the handling of the result of executing
the prepared statement.
- Throws:
Exception
- if execution or result handling fails.
handleResult
protected abstract Object handleResult(ResultSet rs,
Object argOrArgs)
throws Exception
- Handles the result of successful execution of the query.
- Parameters:
rs
- the result set from the query.argOrArgs
- argument or array of arguments passed in from
subclass execute method.
- Returns:
- any result produced by the handling of the result of executing
the prepared statement.
- Throws:
Exception
- if execution or result handling fails.
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.