当前页面:
在线文档首页 >
JBoss 3.2.7 server API Documentation 英文版文档
JDBCUpdateCommand (JBoss Server API) - JBoss 3.2.7 server API Documentation 英文版文档
org.jboss.ejb.plugins.jaws.jdbc
Class JDBCUpdateCommand
java.lang.Object
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand
org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand
- Direct Known Subclasses:
- JDBCCreateEntityCommand, JDBCDestroyCommand, JDBCInitCommand, JDBCRemoveEntityCommand, JDBCStoreEntityCommand
- public abstract class JDBCUpdateCommand
- extends JDBCCommand
Abstract superclass for all JAWS Commands that issue JDBC updates
directly.
Provides a Template Method implementation for
executeStatementAndHandleResult
.
- Version:
- $Revision: 1.8 $
Revisions:
20010812 vincent.harcq@hubmethods.com:
- Get Rid of debug flag, use log4j instead
- 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 |
JDBCUpdateCommand
protected JDBCUpdateCommand(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 integer result.
- 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:
- the result from
handleResult
.
- Throws:
Exception
- if execution or result handling fails.
handleResult
protected abstract Object handleResult(int rowsAffected,
Object argOrArgs)
throws Exception
- Handle the result of successful execution of the update.
- Parameters:
argOrArgs
- argument or array of arguments passed in from
subclass execute method.
- Returns:
- any result needed by the subclass
execute
.
- Throws:
Exception
- if result handling fails.
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.