|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.akquinet.jbosscc.needle.db.operation.AbstractDBOperation
public abstract class AbstractDBOperation
An abstract implementation of DBOperation with common jdbc operations.
| Constructor Summary | |
|---|---|
AbstractDBOperation(JdbcConfiguration jdbcConfiguration)
|
|
| Method Summary | |
|---|---|
protected void |
closeConnection()
Close the connection to the database. |
protected void |
commit()
Commits the current transaction. |
protected void |
executeScript(String filename,
Statement statement)
Execute the given sql script. |
protected Connection |
getConnection()
Returns the sql connection object. |
protected List<String> |
getTableNames(Connection connection)
Returns the names of all tables in the database by using DatabaseMetaData. |
protected void |
openConnection()
Establish a connection to the given database. |
protected void |
rollback()
Revoke the current transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.akquinet.jbosscc.needle.db.operation.DBOperation |
|---|
setUpOperation, tearDownOperation |
| Constructor Detail |
|---|
public AbstractDBOperation(JdbcConfiguration jdbcConfiguration)
| Method Detail |
|---|
protected void openConnection()
throws SQLException
SQLException - if a database access error occurs
protected void closeConnection()
throws SQLException
SQLException - if a database access error occurs
protected void commit()
throws SQLException
SQLException - if a database access error occurs
protected void rollback()
throws SQLException
SQLException - if a database access error occurs
protected List<String> getTableNames(Connection connection)
throws SQLException
connection - the jdbc connection object
List of all table names
SQLException - if a database access error occurs
protected void executeScript(String filename,
Statement statement)
throws SQLException
filename - the filename of the sql scriptstatement - the Statement to be used for executing a SQL statement.
SQLException - if a database access error occurs
protected Connection getConnection()
throws SQLException
SQLException - if a database access error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||