站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

JDBCIdentityColumnCreateCommand (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


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

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
      extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCIdentityColumnCreateCommand
All Implemented Interfaces:
JDBCCreateCommand
Direct Known Subclasses:
JDBC30GeneratedKeysCreateCommand, JDBCDB2IdentityValLocalCreateCommand, JDBCHsqldbCreateCommand, JDBCInformixCreateCommand, JDBCMySQLCreateCommand, JDBCOracleCreateCommand, JDBCPostgreSQLCreateCommand, JDBCSQLServerCreateCommand, JDBCSybaseCreateCommand

public abstract class JDBCIdentityColumnCreateCommand
extends JDBCAbstractCreateCommand

Base class for create commands where the PK value is generated as side effect of performing the insert operation. This is typically associated with database platforms that use identity columns

Author:
Jeremy Boynes

Field Summary
protected  JDBCCMPFieldBridge pkField
           
protected  String pkSQL
           
 
Fields inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
createAllowed, debug, entity, exceptionProcessor, insertAfterEjbPostCreate, insertFields, insertSQL, log, securityManager, trace
 
Constructor Summary
JDBCIdentityColumnCreateCommand()
           
 
Method Summary
protected  int executeInsert(int paramIndex, PreparedStatement ps, EntityEnterpriseContext ctx)
           
protected  void initGeneratedFields()
           
protected  boolean isInsertField(JDBCFieldBridge field)
           
protected  SQLException processException(Throwable t)
          Helper for subclasses that use reflection to avoid driver dependencies.
 
Methods inherited from class org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
afterInsert, beforeInsert, checkCreateAllowed, execute, generateFields, getGeneratedPKField, getPrimaryKey, init, initEntityCommand, initInsertFields, initInsertSQL, performInsert, prepareStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pkField

protected JDBCCMPFieldBridge pkField

pkSQL

protected String pkSQL
Constructor Detail

JDBCIdentityColumnCreateCommand

public JDBCIdentityColumnCreateCommand()
Method Detail

isInsertField

protected boolean isInsertField(JDBCFieldBridge field)
Overrides:
isInsertField in class JDBCAbstractCreateCommand

initGeneratedFields

protected void initGeneratedFields()
                            throws org.jboss.deployment.DeploymentException
Overrides:
initGeneratedFields in class JDBCAbstractCreateCommand
Throws:
org.jboss.deployment.DeploymentException

executeInsert

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

processException

protected SQLException processException(Throwable t)
Helper for subclasses that use reflection to avoid driver dependencies.

Parameters:
t - an Exception raised by a reflected call
Returns:
SQLException extracted from the Throwable


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