org.makumba.db.makumba.sql
Class SQLDBConnection
java.lang.Object
org.makumba.db.TransactionImplementation
org.makumba.db.makumba.DBConnection
org.makumba.db.makumba.sql.SQLDBConnection
- All Implemented Interfaces:
- Database, Transaction
public class SQLDBConnection
- extends DBConnection
Field Summary |
(package private) int |
n
|
(package private) static int |
nconn
|
Methods inherited from class org.makumba.db.makumba.DBConnection |
deleteLock, executeQuery, executeQuery, executeReadQuery, executeUpdate, getDataSource, getHostDatabase, getName, getNullConstant, getQuery, insert, insert, insertFromQueryImpl, lock, setDataSource, treatParam, unlock, unlockAll, writeReadQuery |
Methods inherited from class org.makumba.db.TransactionImplementation |
delete, delete, delete1, extractReadFields, getParameterName, getPrimaryKeyName, getPrimaryKeyName, getSetJoinSyntax, getTransactionProvider, insert, insertFromQuery, paramsToMap, paramsToMap1, read, readCharEnumValues, readExternalSetValues, readIntEnumValues, readSetValues, setContext, transformTypeName, update, update, updateSet, updateWithValueDiff |
nconn
static int nconn
n
int n
SQLDBConnection
SQLDBConnection(Database db,
TransactionProvider tp,
com.mchange.v2.c3p0.PooledDataSource pooledDataSource)
throws SQLException
- Throws:
SQLException
close
public void close()
- Description copied from interface:
Transaction
- Give this connection back to the system. This will automatically commit the transaction if it was not committed.
A connection cannot be used after closing.
- Specified by:
close
in interface Database
- Specified by:
close
in interface Transaction
- Specified by:
close
in class TransactionImplementation
commit
public void commit()
- Description copied from interface:
Transaction
- Commit the transaction associated with this connection. Normally, simply closing the connection will do, but more
often committs may be needed. The business logic manager will close (and therefore commit) all transaction that
it provides for usage.
- Specified by:
commit
in interface Database
- Specified by:
commit
in interface Transaction
- Specified by:
commit
in class TransactionImplementation
rollback
public void rollback()
- Description copied from interface:
Transaction
- Rollback the transaction associated with this connection. Typically rollback should be doneif an error occurs in
a business logic operation. The business logic manager will rollback a transaction that it provided for usage if
it catches any exception during the business logic execution.
- Specified by:
rollback
in interface Database
- Specified by:
rollback
in interface Transaction
- Specified by:
rollback
in class TransactionImplementation
toString
public String toString()
- Overrides:
toString
in class Object
getMetaData
public DatabaseMetaData getMetaData()
throws SQLException
- Throws:
SQLException
createStatement
public Statement createStatement()
throws SQLException
- Throws:
SQLException
getPreparedStatement
public PreparedStatement getPreparedStatement(String s)