Interface TargetDatabaseConfiguration
-
- All Superinterfaces:
DatabaseConfiguration
- All Known Implementing Classes:
Db2TargetDatabaseConfiguration
,DefaultTargetDatabaseConfiguration
,DerbyTargetDatabaseConfiguration
,ExportDumpDatabaseConfiguration
,GenericTargetDatabaseConfiguration
,H2DbTargetDatabaseConfiguration
,HsqldbTargetDatabaseConfiguration
,MariaDbTargetDatabaseConfiguration
,MsAccessTargetDatabaseConfiguration
,MsSqlTargetDatabaseConfiguration
,MySqlTargetDatabaseConfiguration
,OracleTargetDatabaseConfiguration
,PostgresqlTargetDatabaseConfiguration
public interface TargetDatabaseConfiguration extends DatabaseConfiguration
Configuration methods for target data base. Implementations may execute specific initialization code before and after operations are executed.© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
afterInsert(Connection connection, String connectorId, TableMetaData table)
Called after an INSERT clause is executed.void
afterNewRow(Connection connection, String connectorId, TableMetaData table)
Called after a new row of data (VALUES clause) has been added to the INSERT statement.void
beforeInsert(Connection connection, String connectorId, TableMetaData table)
Called before an INSERT clause is executed.void
beforeNewRow(Connection connection, String connectorId, TableMetaData table)
Called before a new row of data (VALUES clause) is added to the INSERT statement.void
finalizeTargetConnection(Connection connection, String connectorId)
Called after actions have been performed.void
initializeTargetConnection(Connection connection, String connectorId)
Called before any action is performed which may alter the state of the target data base.boolean
isMayCommit()
If running within a container managed transaction such as within an EJB we cannot call commit() on the connection.-
Methods inherited from interface de.akquinet.jbosscc.guttenbase.configuration.DatabaseConfiguration
afterTableCopy, beforeTableCopy
-
-
-
-
Method Detail
-
isMayCommit
boolean isMayCommit()
If running within a container managed transaction such as within an EJB we cannot call commit() on the connection. This method should return false then.
-
initializeTargetConnection
void initializeTargetConnection(Connection connection, String connectorId) throws SQLException
Called before any action is performed which may alter the state of the target data base.Implementing classes usually disable foreign key and other constraints temporarily.
- Throws:
SQLException
-
finalizeTargetConnection
void finalizeTargetConnection(Connection connection, String connectorId) throws SQLException
Called after actions have been performed.Implementing classes usually re-enable foreign key and other constraints.
- Throws:
SQLException
-
beforeInsert
void beforeInsert(Connection connection, String connectorId, TableMetaData table) throws SQLException
Called before an INSERT clause is executed. E.g., in order to disable foreign key constraints. Note that an INSERT statement may have multiple VALUES clauses.- Throws:
SQLException
-
afterInsert
void afterInsert(Connection connection, String connectorId, TableMetaData table) throws SQLException
Called after an INSERT clause is executed. E.g., in order to re-enable foreign key constraints.- Throws:
SQLException
-
beforeNewRow
void beforeNewRow(Connection connection, String connectorId, TableMetaData table) throws SQLException
Called before a new row of data (VALUES clause) is added to the INSERT statement. Note that an INSERT statement may have multiple VALUES clauses. This method will be called for every VALUES clause.- Throws:
SQLException
-
afterNewRow
void afterNewRow(Connection connection, String connectorId, TableMetaData table) throws SQLException
Called after a new row of data (VALUES clause) has been added to the INSERT statement.- Throws:
SQLException
-
-