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

java.lang.Object
  extended by org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
      extended by org.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand
          extended by org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand
All Implemented Interfaces:
JDBCCreateCommand

public class JDBCSQLServerCreateCommand
extends JDBCIdentityColumnCreateCommand

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.

Version:
$Revision: 1.4.2.2 $
Author:
Jeremy Boynes

Field Summary
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand
pkField, pkSQL
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
createAllowed, debug, entity, exceptionProcessor, insertAfterEjbPostCreate, insertFields, insertSQL, log, securityManager, trace
 
Constructor Summary
JDBCSQLServerCreateCommand()
           
 
Method Summary
protected  int executeInsert(int index, PreparedStatement ps, EntityEnterpriseContext ctx)
           
protected  void initEntityCommand(JDBCEntityCommandMetaData entityCommand)
           
protected  void initInsertSQL()
           
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand
initGeneratedFields, isInsertField, processException
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
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 entityCommand)
                          throws org.jboss.deployment.DeploymentException
Overrides:
initEntityCommand in class JDBCAbstractCreateCommand
Throws:
org.jboss.deployment.DeploymentException

initInsertSQL

protected void initInsertSQL()
Overrides:
initInsertSQL in class JDBCAbstractCreateCommand

executeInsert

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.