org.apache.openjpa.lib.jdbc
Class ConfiguringConnectionDecorator.ConfiguringConnection

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

public class ConfiguringConnectionDecorator.ConfiguringConnection
extends DelegatingConnection

Decorator to configure connection components correctly.


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

Constructor Detail

ConfiguringConnectionDecorator.ConfiguringConnection

public ConfiguringConnectionDecorator.ConfiguringConnection(Connection conn)
                                                     throws SQLException
Throws:
SQLException
Method Detail

setAutoCommit

public void setAutoCommit(boolean auto)
                   throws SQLException
Specified by:
setAutoCommit in interface Connection
Overrides:
setAutoCommit in class DelegatingConnection
Throws:
SQLException

commit

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

rollback

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

prepareStatement

protected PreparedStatement prepareStatement(String sql,
                                             boolean wrap)
                                      throws 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:
SQLException

prepareStatement

protected PreparedStatement prepareStatement(String sql,
                                             int rsType,
                                             int rsConcur,
                                             boolean wrap)
                                      throws 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:
SQLException

createStatement

protected Statement createStatement(boolean wrap)
                             throws 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:
SQLException

createStatement

protected Statement createStatement(int rsType,
                                    int rsConcur,
                                    boolean wrap)
                             throws 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:
SQLException


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.