Class MsSqlTargetDatabaseConfiguration
- java.lang.Object
-
- de.akquinet.jbosscc.guttenbase.configuration.impl.AbstractDatabaseConfiguration
-
- de.akquinet.jbosscc.guttenbase.configuration.impl.DefaultTargetDatabaseConfiguration
-
- de.akquinet.jbosscc.guttenbase.configuration.impl.MsSqlTargetDatabaseConfiguration
-
- All Implemented Interfaces:
DatabaseConfiguration
,TargetDatabaseConfiguration
public class MsSqlTargetDatabaseConfiguration extends DefaultTargetDatabaseConfiguration
Implementation for MS Server SQL data base.© 2012-2034 akquinet tech@spree
- Author:
- M. Dahm
Hint is used by
TableMapperHint
-
-
Field Summary
-
Fields inherited from class de.akquinet.jbosscc.guttenbase.configuration.impl.AbstractDatabaseConfiguration
_connectorRepository
-
-
Constructor Summary
Constructors Constructor Description MsSqlTargetDatabaseConfiguration(ConnectorRepository connectorRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterInsert(Connection connection, String connectorId, TableMetaData table)
Called after an INSERT clause is executed.void
beforeInsert(Connection connection, String connectorId, TableMetaData table)
Called before an INSERT clause is executed.void
finalizeTargetConnection(Connection connection, String connectorId)
Called after actions have been performed.void
initializeTargetConnection(Connection connection, String connectorId)
Connection is set autocommit false.-
Methods inherited from class de.akquinet.jbosscc.guttenbase.configuration.impl.DefaultTargetDatabaseConfiguration
afterNewRow, beforeNewRow, isMayCommit
-
Methods inherited from class de.akquinet.jbosscc.guttenbase.configuration.impl.AbstractDatabaseConfiguration
afterTableCopy, beforeTableCopy, executeSQL
-
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.guttenbase.configuration.DatabaseConfiguration
afterTableCopy, beforeTableCopy
-
-
-
-
Constructor Detail
-
MsSqlTargetDatabaseConfiguration
public MsSqlTargetDatabaseConfiguration(ConnectorRepository connectorRepository)
-
-
Method Detail
-
initializeTargetConnection
public void initializeTargetConnection(Connection connection, String connectorId) throws SQLException
Connection is set autocommit false.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.
- Specified by:
initializeTargetConnection
in interfaceTargetDatabaseConfiguration
- Overrides:
initializeTargetConnection
in classDefaultTargetDatabaseConfiguration
- Throws:
SQLException
-
finalizeTargetConnection
public void finalizeTargetConnection(Connection connection, String connectorId) throws SQLException
Called after actions have been performed.Implementing classes usually re-enable foreign key and other constraints.
- Specified by:
finalizeTargetConnection
in interfaceTargetDatabaseConfiguration
- Overrides:
finalizeTargetConnection
in classDefaultTargetDatabaseConfiguration
- Throws:
SQLException
-
beforeInsert
public 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.- Specified by:
beforeInsert
in interfaceTargetDatabaseConfiguration
- Overrides:
beforeInsert
in classDefaultTargetDatabaseConfiguration
- Throws:
SQLException
-
afterInsert
public 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.- Specified by:
afterInsert
in interfaceTargetDatabaseConfiguration
- Overrides:
afterInsert
in classDefaultTargetDatabaseConfiguration
- Throws:
SQLException
-
-