Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.ejb.plugins.cmp » jdbc » mysql » [javadoc | source]
org.jboss.ejb.plugins.cmp.jdbc.mysql
public class: JDBCMySQLCreateCommand [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.mysql.JDBCMySQLCreateCommand

All Implemented Interfaces:
    JDBCCreateCommand

JDBCMySQLCreateCommand executes an INSERT INTO query. The command uses getGeneratedKeys method from MySQL native Statement interface implementation to fetch the generated key. It works under JDK versions 1.3 and 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.mysql.JDBCMySQLCreateCommand Summary:
entityExists,   execute,   getInsertFields,   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.mysql.JDBCMySQLCreateCommand Detail:
 protected boolean entityExists(Object pk) throws CreateException 
    Assume MySQL won't generate duplicate keys
 public Object execute(Method m,
    Object[] args,
    EntityEnterpriseContext ctx) throws CreateException 
 protected List getInsertFields() 
    This method includes only non primary key fields
 protected  void insertEntity(EntityEnterpriseContext ctx) throws CreateException 
    This method executes MySQL specific code