|
JBoss API: Class JDBCStoreEntityCommand
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.7.6.2 $
- Author:
- Rickard Öberg, Marc Fleury, Joe Shevland, Justin Forder, Sebastien Alborini
- See Also:
Method Summary |
protected boolean |
changed(java.lang.Object current,
java.lang.Object old)
|
void |
execute(EntityEnterpriseContext ctx)
|
protected java.lang.String |
getSQL(java.lang.Object argOrArgs)
Returns dynamically-generated SQL if this entity
has tuned updates, otherwise static SQL. |
protected java.lang.Object |
handleResult(int rowsAffected,
java.lang.Object argOrArgs)
Handle the result of successful execution of the update. |
protected java.lang.String |
makeSQL(java.lang.Object argOrArgs)
Used to create static SQL (tuned = false) or dynamic SQL (tuned = true). |
protected void |
setParameters(java.sql.PreparedStatement stmt,
java.lang.Object argOrArgs)
Default implementation does nothing. |
Methods inherited from class org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand |
getCMPFieldValue, getConnection, getJawsCMPFieldJDBCType, getJDBCType, getJDBCTypeName, 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)
throws java.rmi.RemoteException
if not a tuned or untuned update is issued.
- Specified by:
execute in interface JPMStoreEntityCommand
getSQL
protected java.lang.String getSQL(java.lang.Object argOrArgs)
throws java.lang.Exception
- Returns dynamically-generated SQL if this entity
has tuned updates, otherwise static SQL.
- Overrides:
getSQL in class JDBCCommand
- Following copied from class:
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand
- Parameters:
argOrArgs - argument or array of arguments passed in from
subclass execute method.- Returns:
- the SQL to use in the PreparedStatement.
- Throws:
java.lang.Exception - if an attempt to generate dynamic SQL results in
an Exception.
setParameters
protected void setParameters(java.sql.PreparedStatement stmt,
java.lang.Object argOrArgs)
throws java.lang.Exception
- Description copied from class:
JDBCCommand
- Default implementation does nothing.
Override if parameters need to be set.
- Overrides:
setParameters in class JDBCCommand
- Following copied from class:
org.jboss.ejb.plugins.jaws.jdbc.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:
java.lang.Exception - if parameter setting fails.
handleResult
protected java.lang.Object handleResult(int rowsAffected,
java.lang.Object argOrArgs)
throws java.lang.Exception
- Description copied from class:
JDBCUpdateCommand
- Handle the result of successful execution of the update.
- Overrides:
handleResult in class JDBCUpdateCommand
- Following copied from class:
org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand
- Parameters:
rs - the result set from the query.argOrArgs - argument or array of arguments passed in from
subclass execute method.- Returns:
- any result needed by the subclass
execute . - Throws:
java.lang.Exception - if result handling fails.
changed
protected final boolean changed(java.lang.Object current,
java.lang.Object old)
makeSQL
protected java.lang.String makeSQL(java.lang.Object argOrArgs)
- Used to create static SQL (tuned = false) or dynamic SQL (tuned = true).
Copyright © 2000 The JBoss Organization. All Rights Reserved.
|