Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.ejb.plugins.cmp » jdbc » jdbc3 » [javadoc | source]
org.jboss.ejb.plugins.cmp.jdbc.jdbc3
public class: JDBCGetGeneratedKeysCreateCommand [javadoc | source]
java.lang.Object
   org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
      org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand
         org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand
            org.jboss.ejb.plugins.cmp.jdbc.jdbc3.JDBCGetGeneratedKeysCreateCommand

All Implemented Interfaces:
    JDBCCreateCommand

JDBCGetGeneratedKeysCreateCommand executes an INSERT INTO query. This command uses getGeneratedKeys method to fetch the generated by database value of the primary key. Thus, it's not available only in JDK version less than 1.4.
Fields inherited from org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand:
existsSQL
Fields inherited from org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand:
log,  debug,  trace,  entity,  securityManager,  createAllowed,  exceptionProcessor,  insertSQL,  insertFields,  insertAfterEjbPostCreate
Method from org.jboss.ejb.plugins.cmp.jdbc.jdbc3.JDBCGetGeneratedKeysCreateCommand Summary:
createEntityExistsSQL,   entityExists,   execute,   getInsertFields,   init,   insertEntity
Methods from org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand:
beforeInsert,   init,   initExistsSQL
Methods from org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand:
afterInsert,   beforeInsert,   checkCreateAllowed,   execute,   executeInsert,   generateFields,   getGeneratedPKField,   getPrimaryKey,   init,   initEntityCommand,   initGeneratedFields,   initInsertFields,   initInsertSQL,   isInsertField,   performInsert,   prepareStatement
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.cmp.jdbc.jdbc3.JDBCGetGeneratedKeysCreateCommand Detail:
 protected String createEntityExistsSQL() 
 protected boolean entityExists(Object pk) throws CreateException 
 public Object execute(Method m,
    Object[] args,
    EntityEnterpriseContext ctx) throws CreateException 
 protected List getInsertFields() 
    The method adds to insert fields only non-primary key fields
 public  void init(JDBCStoreManager manager) 
    The method differs only in that, it has no entityExistsSQL
 protected  void insertEntity(EntityEnterpriseContext ctx) throws CreateException