org.apache.openjpa.lib.jdbc
Class JDBCEventConnectionDecorator.EventConnection

java.lang.Object
  extended by org.apache.openjpa.lib.jdbc.DelegatingConnection
      extended by org.apache.openjpa.lib.jdbc.JDBCEventConnectionDecorator.EventConnection
All Implemented Interfaces:
java.sql.Connection, java.sql.Wrapper, Closeable
Enclosing class:
JDBCEventConnectionDecorator

protected abstract class JDBCEventConnectionDecorator.EventConnection
extends DelegatingConnection

Fires events as appropriate.


Field Summary
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
JDBCEventConnectionDecorator.EventConnection(java.sql.Connection conn)
           
 
Method Summary
 void close()
           
 void commit()
           
protected  java.sql.Statement createStatement(boolean wrap)
          Create a statement, with the option of not wrapping it in a DelegatingStatement, which is the default.
protected  java.sql.Statement createStatement(int rsType, int rsConcur, boolean wrap)
          Create a statement, with the option of not wrapping it in a DelegatingStatement, which is the default.
protected  java.sql.PreparedStatement prepareStatement(java.lang.String sql, boolean wrap)
          Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement, which is the default.
protected  java.sql.PreparedStatement prepareStatement(java.lang.String sql, int rsType, int rsConcur, boolean wrap)
          Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement, which is the default.
 void rollback()
           
 
Methods inherited from class org.apache.openjpa.lib.jdbc.DelegatingConnection
appendInfo, clearWarnings, createStatement, createStatement, createStatement, createStatement, enforceAbstract, equals, getAutoCommit, getCatalog, getDelegate, getHoldability, getInnermostDelegate, getMetaData, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, hashCode, isClosed, isReadOnly, isWrapperFor, nativeSQL, newInstance, prepareCall, prepareCall, prepareCall, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, toString, unwrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.Connection
createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, isValid, setClientInfo, setClientInfo
 

Constructor Detail

JDBCEventConnectionDecorator.EventConnection

public JDBCEventConnectionDecorator.EventConnection(java.sql.Connection conn)
Method Detail

commit

public void commit()
            throws java.sql.SQLException
Specified by:
commit in interface java.sql.Connection
Overrides:
commit in class DelegatingConnection
Throws:
java.sql.SQLException

rollback

public void rollback()
              throws java.sql.SQLException
Specified by:
rollback in interface java.sql.Connection
Overrides:
rollback in class DelegatingConnection
Throws:
java.sql.SQLException

createStatement

protected java.sql.Statement createStatement(boolean wrap)
                                      throws java.sql.SQLException
Description copied from class: DelegatingConnection
Create a statement, with the option of not wrapping it in a DelegatingStatement, which is the default.

Overrides:
createStatement in class DelegatingConnection
Throws:
java.sql.SQLException

createStatement

protected java.sql.Statement createStatement(int rsType,
                                             int rsConcur,
                                             boolean wrap)
                                      throws java.sql.SQLException
Description copied from class: DelegatingConnection
Create a statement, with the option of not wrapping it in a DelegatingStatement, which is the default.

Overrides:
createStatement in class DelegatingConnection
Throws:
java.sql.SQLException

prepareStatement

protected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                      boolean wrap)
                                               throws java.sql.SQLException
Description copied from class: DelegatingConnection
Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement, which is the default.

Overrides:
prepareStatement in class DelegatingConnection
Throws:
java.sql.SQLException

prepareStatement

protected java.sql.PreparedStatement prepareStatement(java.lang.String sql,
                                                      int rsType,
                                                      int rsConcur,
                                                      boolean wrap)
                                               throws java.sql.SQLException
Description copied from class: DelegatingConnection
Prepare a statement, with the option of not wrapping it in a DelegatingPreparedStatement, which is the default.

Overrides:
prepareStatement in class DelegatingConnection
Throws:
java.sql.SQLException

close

public void close()
           throws java.sql.SQLException
Specified by:
close in interface java.sql.Connection
Specified by:
close in interface Closeable
Overrides:
close in class DelegatingConnection
Throws:
java.sql.SQLException