org.jboss.ejb.plugins.cmp.jdbc
Class JDBCInsertPKCreateCommand

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand (src) 
      extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCInsertPKCreateCommand
All Implemented Interfaces:
JDBCCreateCommand (src)
Direct Known Subclasses:
JDBCCreateEntityCommand (src) , JDBCKeyGeneratorCreateCommand (src) , JDBCPkSqlCreateCommand (src)

public abstract class JDBCInsertPKCreateCommand
extends JDBCAbstractCreateCommand (src)

Base class for create commands that actually insert the primary key value. If an exception processor is not supplied, this command will perform an additional query to determine if a DuplicateKeyException should be thrown.


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

Field Detail

existsSQL

protected java.lang.String existsSQL
Constructor Detail

JDBCInsertPKCreateCommand

public JDBCInsertPKCreateCommand()
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)

initExistsSQL

protected void initExistsSQL()

beforeInsert

protected void beforeInsert(EntityEnterpriseContext (src)  ctx)
                     throws CreateException (src) 
Overrides:
beforeInsert in class JDBCAbstractCreateCommand (src)
Throws:
CreateException (src)