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

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.JDBCOracleSequenceCreateCommand
All Implemented Interfaces:
JDBCCreateCommand (src)

public class JDBCOracleSequenceCreateCommand
extends JDBCIdentityColumnCreateCommand (src)

Create command for use with Oracle that uses a sequence in conjuction with a RETURNING clause to generate keys in a single statement The sequence is called by the parameter attribute "sequence_name". As an example, the sequence_name could be %%t_sequence to use _sequence for each distinct table.


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
JDBCOracleSequenceCreateCommand()
           
 
Method Summary
protected  int executeInsert(java.sql.PreparedStatement ps, EntityEnterpriseContext (src)  ctx)
           
 void init(JDBCStoreManager (src)  manager)
           
protected  void initEntityCommand(JDBCEntityCommandMetaData (src)  entityCommand)
           
protected  void initInsertSQL()
           
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)
executeInsert, initGeneratedFields, isInsertField, processException
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand (src)
afterInsert, beforeInsert, checkCreateAllowed, execute, generateFields, getGeneratedPKField, getPrimaryKey, initInsertFields, performInsert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCOracleSequenceCreateCommand

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

initEntityCommand

protected void initEntityCommand(JDBCEntityCommandMetaData (src)  entityCommand)
                          throws DeploymentException (src) 
Overrides:
initEntityCommand in class JDBCAbstractCreateCommand (src)
Throws:
DeploymentException (src)

initInsertSQL

protected void initInsertSQL()
Overrides:
initInsertSQL in class JDBCAbstractCreateCommand (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(java.sql.PreparedStatement ps,
                            EntityEnterpriseContext (src)  ctx)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException