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

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

public class JDBCSQLServerCreateCommand
extends JDBCIdentityColumnCreateCommand (src)

Create command for Microsoft SQL Server that uses the value from an IDENTITY columns. By default uses "SELECT SCOPE_IDENTITY()" to reduce the impact of triggers; can be overridden with "pk-sql" attribute e.g. for V7.


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
JDBCSQLServerCreateCommand()
           
 
Method Summary
protected  int executeInsert(int index, java.sql.PreparedStatement ps, EntityEnterpriseContext (src)  ctx)
           
protected  void initEntityCommand(JDBCEntityCommandMetaData (src)  entityCommand)
           
protected  void initInsertSQL()
           
 
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, init, initInsertFields, performInsert, prepareStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCSQLServerCreateCommand

public JDBCSQLServerCreateCommand()
Method Detail

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)

executeInsert

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