org.jboss.ejb.plugins.cmp.jdbc.keygen
Class JDBC30GeneratedKeysCreateCommand

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand (src) 
      extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand (src) 
          extended byorg.jboss.ejb.plugins.cmp.jdbc.keygen.JDBC30GeneratedKeysCreateCommand
All Implemented Interfaces:
JDBCCreateCommand (src)

public class JDBC30GeneratedKeysCreateCommand
extends JDBCIdentityColumnCreateCommand (src)

Create method that uses the JDBC 3.0 getGeneratedKeys method to obtain the value from the identity column.


Field Summary
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand (src)
pkField, pkSQL
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand (src)
createAllowed, debug, entity, exceptionProcessor, insertAfterEjbPostCreate, insertFields, insertSQL, log, securityManager, trace
 
Constructor Summary
JDBC30GeneratedKeysCreateCommand()
           
 
Method Summary
protected  int executeInsert(int paramIndex, java.sql.PreparedStatement ps, EntityEnterpriseContext (src)  ctx)
           
 void init(JDBCStoreManager (src)  manager)
           
protected  java.sql.PreparedStatement prepareStatement(java.sql.Connection c, java.lang.String sql, EntityEnterpriseContext (src)  ctx)
           
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand (src)
initGeneratedFields, isInsertField, processException
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand (src)
afterInsert, beforeInsert, checkCreateAllowed, execute, generateFields, getGeneratedPKField, getPrimaryKey, initEntityCommand, initInsertFields, initInsertSQL, performInsert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBC30GeneratedKeysCreateCommand

public JDBC30GeneratedKeysCreateCommand()
Method Detail

init

public void init(JDBCStoreManager (src)  manager)
          throws DeploymentException (src) 
Specified by:
init in interface JDBCCreateCommand (src)
Overrides:
init in class JDBCAbstractCreateCommand (src)
Throws:
DeploymentException (src)

prepareStatement

protected java.sql.PreparedStatement prepareStatement(java.sql.Connection c,
                                                      java.lang.String sql,
                                                      EntityEnterpriseContext (src)  ctx)
                                               throws java.sql.SQLException
Overrides:
prepareStatement in class JDBCAbstractCreateCommand (src)
Throws:
java.sql.SQLException

executeInsert

protected int executeInsert(int paramIndex,
                            java.sql.PreparedStatement ps,
                            EntityEnterpriseContext (src)  ctx)
                     throws java.sql.SQLException
Overrides:
executeInsert in class JDBCIdentityColumnCreateCommand (src)
Throws:
java.sql.SQLException