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

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


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

java.lang.Object
  extended byorg.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand
All Implemented Interfaces:
JDBCCreateCommand
Direct Known Subclasses:
JDBCIdentityColumnCreateCommand, JDBCInsertPKCreateCommand

public abstract class JDBCAbstractCreateCommand
extends Object
implements JDBCCreateCommand

Base class for create commands that drives the operation sequence.

Author:
Jeremy Boynes, Alexey Loubyansky

Field Summary
protected  boolean createAllowed
           
protected  boolean debug
           
protected  JDBCEntityBridge entity
           
protected  SQLExceptionProcessorMBean exceptionProcessor
           
protected  boolean insertAfterEjbPostCreate
           
protected  JDBCFieldBridge[] insertFields
           
protected  String insertSQL
           
protected  org.jboss.logging.Logger log
           
protected  AuthenticationManager securityManager
           
protected  boolean trace
           
 
Constructor Summary
JDBCAbstractCreateCommand()
           
 
Method Summary
protected  void afterInsert(EntityEnterpriseContext ctx)
           
protected  void beforeInsert(EntityEnterpriseContext ctx)
           
protected  void checkCreateAllowed()
           
 Object execute(Method m, Object[] args, EntityEnterpriseContext ctx)
           
protected  int executeInsert(int paramIndex, PreparedStatement ps, EntityEnterpriseContext ctx)
           
protected  void generateFields(EntityEnterpriseContext ctx)
           
protected  JDBCCMPFieldBridge getGeneratedPKField()
           
protected  Object getPrimaryKey(EntityEnterpriseContext ctx)
           
 void init(JDBCStoreManager manager)
           
protected  void initEntityCommand(JDBCEntityCommandMetaData entityCommand)
           
protected  void initGeneratedFields()
           
protected  void initInsertFields()
           
protected  void initInsertSQL()
           
protected  boolean isInsertField(JDBCFieldBridge field)
           
protected  void performInsert(EntityEnterpriseContext ctx)
           
protected  PreparedStatement prepareStatement(Connection c, String sql, EntityEnterpriseContext ctx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.jboss.logging.Logger log

debug

protected boolean debug

trace

protected boolean trace

entity

protected JDBCEntityBridge entity

securityManager

protected AuthenticationManager securityManager

createAllowed

protected boolean createAllowed

exceptionProcessor

protected SQLExceptionProcessorMBean exceptionProcessor

insertSQL

protected String insertSQL

insertFields

protected JDBCFieldBridge[] insertFields

insertAfterEjbPostCreate

protected boolean insertAfterEjbPostCreate
Constructor Detail

JDBCAbstractCreateCommand

public JDBCAbstractCreateCommand()
Method Detail

init

public void init(JDBCStoreManager manager)
          throws org.jboss.deployment.DeploymentException
Specified by:
init in interface JDBCCreateCommand
Throws:
org.jboss.deployment.DeploymentException

initEntityCommand

protected void initEntityCommand(JDBCEntityCommandMetaData entityCommand)
                          throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

execute

public Object execute(Method m,
                      Object[] args,
                      EntityEnterpriseContext ctx)
               throws javax.ejb.CreateException
Specified by:
execute in interface JDBCCreateCommand
Throws:
javax.ejb.CreateException

checkCreateAllowed

protected void checkCreateAllowed()
                           throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

getGeneratedPKField

protected JDBCCMPFieldBridge getGeneratedPKField()
                                          throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

initGeneratedFields

protected void initGeneratedFields()
                            throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

generateFields

protected void generateFields(EntityEnterpriseContext ctx)
                       throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

initInsertFields

protected void initInsertFields()

isInsertField

protected boolean isInsertField(JDBCFieldBridge field)

initInsertSQL

protected void initInsertSQL()

beforeInsert

protected void beforeInsert(EntityEnterpriseContext ctx)
                     throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

performInsert

protected void performInsert(EntityEnterpriseContext ctx)
                      throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

prepareStatement

protected PreparedStatement prepareStatement(Connection c,
                                             String sql,
                                             EntityEnterpriseContext ctx)
                                      throws SQLException
Throws:
SQLException

executeInsert

protected int executeInsert(int paramIndex,
                            PreparedStatement ps,
                            EntityEnterpriseContext ctx)
                     throws SQLException
Throws:
SQLException

afterInsert

protected void afterInsert(EntityEnterpriseContext ctx)
                    throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

getPrimaryKey

protected Object getPrimaryKey(EntityEnterpriseContext ctx)


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