Package org.apache.openjpa.lib.jdbc
Class ConfiguringConnectionDecorator.ConfiguringConnection
- java.lang.Object
-
- org.apache.openjpa.lib.jdbc.DelegatingConnection
-
- org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.ConfiguringConnection
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.sql.Connection,java.sql.Wrapper,Closeable
- Enclosing class:
- ConfiguringConnectionDecorator
public class ConfiguringConnectionDecorator.ConfiguringConnection extends DelegatingConnection
Decorator to configure connection components correctly.
-
-
Constructor Summary
Constructors Constructor Description ConfiguringConnection(java.sql.Connection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()protected java.sql.StatementcreateStatement(boolean wrap)Create a statement, with the option of not wrapping it in aDelegatingStatement, which is the default.protected java.sql.StatementcreateStatement(int rsType, int rsConcur, boolean wrap)Create a statement, with the option of not wrapping it in aDelegatingStatement, which is the default.protected java.sql.PreparedStatementprepareStatement(java.lang.String sql, boolean wrap)Prepare a statement, with the option of not wrapping it in aDelegatingPreparedStatement, which is the default.protected java.sql.PreparedStatementprepareStatement(java.lang.String sql, int rsType, int rsConcur, boolean wrap)Prepare a statement, with the option of not wrapping it in aDelegatingPreparedStatement, which is the default.voidrollback()voidsetAutoCommit(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
-
-
-
-
Method Detail
-
setAutoCommit
public void setAutoCommit(boolean auto) throws java.sql.SQLException- Specified by:
setAutoCommitin interfacejava.sql.Connection- Overrides:
setAutoCommitin classDelegatingConnection- Throws:
java.sql.SQLException
-
commit
public void commit() throws java.sql.SQLException- Specified by:
commitin interfacejava.sql.Connection- Overrides:
commitin classDelegatingConnection- Throws:
java.sql.SQLException
-
rollback
public void rollback() throws java.sql.SQLException- Specified by:
rollbackin interfacejava.sql.Connection- Overrides:
rollbackin classDelegatingConnection- Throws:
java.sql.SQLException
-
prepareStatement
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, boolean wrap) throws java.sql.SQLExceptionDescription copied from class:DelegatingConnectionPrepare a statement, with the option of not wrapping it in aDelegatingPreparedStatement, which is the default.- Overrides:
prepareStatementin classDelegatingConnection- Throws:
java.sql.SQLException
-
prepareStatement
protected java.sql.PreparedStatement prepareStatement(java.lang.String sql, int rsType, int rsConcur, boolean wrap) throws java.sql.SQLExceptionDescription copied from class:DelegatingConnectionPrepare a statement, with the option of not wrapping it in aDelegatingPreparedStatement, which is the default.- Overrides:
prepareStatementin classDelegatingConnection- Throws:
java.sql.SQLException
-
createStatement
protected java.sql.Statement createStatement(boolean wrap) throws java.sql.SQLExceptionDescription copied from class:DelegatingConnectionCreate a statement, with the option of not wrapping it in aDelegatingStatement, which is the default.- Overrides:
createStatementin classDelegatingConnection- Throws:
java.sql.SQLException
-
createStatement
protected java.sql.Statement createStatement(int rsType, int rsConcur, boolean wrap) throws java.sql.SQLExceptionDescription copied from class:DelegatingConnectionCreate a statement, with the option of not wrapping it in aDelegatingStatement, which is the default.- Overrides:
createStatementin classDelegatingConnection- Throws:
java.sql.SQLException
-
-