Package com.aoindustries.sql
Class PostgresqlConnectionWrapper
- java.lang.Object
-
- com.aoindustries.sql.ConnectionWrapper
-
- com.aoindustries.sql.PostgresqlConnectionWrapper
-
- All Implemented Interfaces:
AutoCloseable,Connection,Wrapper
public class PostgresqlConnectionWrapper extends ConnectionWrapper
Wraps aConnectionand caches the transaction level, intended to avoid unnecessary round-trips imposed by PostgreSQLConnection.getTransactionIsolation()andConnection.setTransactionIsolation(int).- Author:
- AO Industries, Inc.
-
-
Field Summary
-
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetTransactionIsolation()protected ConnectiongetWrappedConnection()Gets the connection that is wrapped.voidsetTransactionIsolation(int level)-
Methods inherited from class com.aoindustries.sql.ConnectionWrapper
abort, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getNetworkTimeout, getSchema, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setNetworkTimeout, setReadOnly, setSavepoint, setSavepoint, setSchema, setTypeMap, unwrap
-
-
-
-
Method Detail
-
setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException- Specified by:
setTransactionIsolationin interfaceConnection- Overrides:
setTransactionIsolationin classConnectionWrapper- Throws:
SQLException
-
getTransactionIsolation
public int getTransactionIsolation() throws SQLException- Specified by:
getTransactionIsolationin interfaceConnection- Overrides:
getTransactionIsolationin classConnectionWrapper- Throws:
SQLException
-
getWrappedConnection
protected Connection getWrappedConnection()
Description copied from class:ConnectionWrapperGets the connection that is wrapped.- Specified by:
getWrappedConnectionin classConnectionWrapper
-
-