当前页面:
在线文档首页 >
JBoss 3.2.7 server API Documentation 英文版文档
JDBCStoreEntityCommand (JBoss Server API) - JBoss 3.2.7 server API Documentation 英文版文档
org.jboss.ejb.plugins.jaws.jdbc
Class JDBCStoreEntityCommand
java.lang.Object
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand
org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand
org.jboss.ejb.plugins.jaws.jdbc.JDBCStoreEntityCommand
- All Implemented Interfaces:
- JPMStoreEntityCommand
- public class JDBCStoreEntityCommand
- extends JDBCUpdateCommand
- implements JPMStoreEntityCommand
JAWSPersistenceManager JDBCStoreEntityCommand
- Version:
- $Revision: 1.10.2.2 $
- Author:
- Rickard 脰berg, Marc Fleury, Joe Shevland, Justin Forder, Sebastien Alborini
- See Also:
Methods inherited from class org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand |
getCMPFieldValue, getConnection, getJawsCMPFieldJDBCType, getJDBCType, getJDBCTypeName, getName, getPkColumnList, getPkColumnWhereList, getPkFieldValue, getResultObject, getResultObject, getState, isBinaryType, jdbcExecute, setCMPFieldValue, setParameter, setPrimaryKeyParameters, setSQL |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCStoreEntityCommand
public JDBCStoreEntityCommand(JDBCCommandFactory factory)
execute
public void execute(EntityEnterpriseContext ctx)
- if the readOnly flag is specified in the xml file this won't store.
if not a tuned or untuned update is issued.
- Specified by:
execute
in interface JPMStoreEntityCommand
getSQL
protected String getSQL(Object argOrArgs)
throws Exception
- Returns dynamically-generated SQL if this entity
has tuned updates, otherwise static SQL.
- Overrides:
getSQL
in class JDBCCommand
- Parameters:
argOrArgs
- argument or array of arguments passed in from
subclass execute method.
- Returns:
- the SQL to use in the PreparedStatement.
- Throws:
Exception
- if an attempt to generate dynamic SQL results in
an Exception.
setParameters
protected void setParameters(PreparedStatement stmt,
Object argOrArgs)
throws Exception
- Description copied from class:
JDBCCommand
- Default implementation does nothing.
Override if parameters need to be set.
- Overrides:
setParameters
in class JDBCCommand
- Parameters:
stmt
- the PreparedStatement which will be executed by this Command.argOrArgs
- argument or array of arguments passed in from
subclass execute method.
- Throws:
Exception
- if parameter setting fails.
handleResult
protected Object handleResult(int rowsAffected,
Object argOrArgs)
throws Exception
- Description copied from class:
JDBCUpdateCommand
- Handle the result of successful execution of the update.
- Specified by:
handleResult
in class JDBCUpdateCommand
- 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.
changed
protected final boolean changed(Object current,
Object old)
makeSQL
protected String makeSQL(Object argOrArgs)
- Used to create static SQL (tuned = false) or dynamic SQL (tuned = true).
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.