public class JDBCConnectionBase extends java.lang.Object implements JDBCConnection
| Modifier and Type | Class and Description |
|---|---|
protected static class |
JDBCConnectionBase.DataSQLException |
| Modifier and Type | Field and Description |
|---|---|
protected java.sql.Connection |
conn |
protected ConnectionProvider |
connectionProvider |
protected java.lang.String |
id |
protected static Logger |
LOGGER |
protected DataTransactionServices |
transaction |
| Constructor and Description |
|---|
JDBCConnectionBase(DataTransactionServices transaction,
java.sql.Connection conn,
java.lang.String id) |
JDBCConnectionBase(DataTransactionServices transaction,
java.sql.Connection conn,
java.lang.String id,
ConnectionProvider connectionProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
begin() |
void |
close() |
void |
closeQuietly() |
void |
commit() |
java.sql.Statement |
createStatement() |
java.sql.Statement |
createStatement(java.lang.String sql) |
void |
dispose()
Disposes the current object, to allow it to close and dispose any used
resources.
|
void |
execute(java.lang.String sql) |
void |
finish() |
java.sql.Connection |
get() |
java.lang.String |
getId() |
java.sql.DatabaseMetaData |
getMetaData() |
boolean |
isInDataTransaction() |
boolean |
isInTransaction() |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql) |
void |
rollback() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseQuietlyprotected static final Logger LOGGER
protected java.sql.Connection conn
protected DataTransactionServices transaction
protected final java.lang.String id
protected final ConnectionProvider connectionProvider
public JDBCConnectionBase(DataTransactionServices transaction, java.sql.Connection conn, java.lang.String id)
public JDBCConnectionBase(DataTransactionServices transaction, java.sql.Connection conn, java.lang.String id, ConnectionProvider connectionProvider)
public java.lang.String getId()
getId in interface DataTransactionServices.ConnectionService<java.sql.Connection>public void close()
throws java.sql.SQLException
close in interface JDBCConnectionjava.sql.SQLExceptionpublic void closeQuietly()
closeQuietly in interface JDBCConnectionpublic boolean isInTransaction()
isInTransaction in interface JDBCConnectionpublic boolean isInDataTransaction()
isInDataTransaction in interface JDBCConnectionpublic void begin()
throws java.sql.SQLException
begin in interface JDBCConnectionjava.sql.SQLExceptionpublic void rollback()
throws java.sql.SQLException
rollback in interface JDBCConnectionjava.sql.SQLExceptionpublic void commit()
throws java.sql.SQLException
commit in interface JDBCConnectionjava.sql.SQLExceptionpublic java.sql.Connection get()
get in interface DataTransactionServices.ConnectionService<java.sql.Connection>get in interface JDBCConnectionpublic void execute(java.lang.String sql)
throws java.sql.SQLException
execute in interface JDBCConnectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement()
throws java.sql.SQLException
createStatement in interface JDBCConnectionjava.sql.SQLExceptionpublic java.sql.Statement createStatement(java.lang.String sql)
throws java.sql.SQLException
createStatement in interface JDBCConnectionjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
prepareStatement in interface JDBCConnectionjava.sql.SQLExceptionpublic java.sql.DatabaseMetaData getMetaData()
throws java.sql.SQLException
getMetaData in interface JDBCConnectionjava.sql.SQLExceptionpublic void dispose()
DisposableNOTE:After calling this method, the object may not be usable anymore.
dispose in interface Disposablepublic void finish()
throws DataException
finish in interface DataTransactionServices.ConnectionService<java.sql.Connection>DataExceptionpublic void abort()
throws DataException
abort in interface DataTransactionServices.ConnectionService<java.sql.Connection>DataException