All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.akquinet.jbosscc.guttenbase.export.ExportDumpDatabaseConfiguration Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package de.akquinet.jbosscc.guttenbase.export;

import java.sql.Connection;
import java.sql.SQLException;

import de.akquinet.jbosscc.guttenbase.configuration.impl.DefaultTargetDatabaseConfiguration;
import de.akquinet.jbosscc.guttenbase.meta.TableMetaData;
import de.akquinet.jbosscc.guttenbase.repository.ConnectorRepository;

/**
 * Export dump configuration forwards important events to {@link ExportDumpConnection}.
 * 
 * 

* © 2012-2020 akquinet tech@spree *

* * @author M. Dahm */ public class ExportDumpDatabaseConfiguration extends DefaultTargetDatabaseConfiguration { public ExportDumpDatabaseConfiguration(final ConnectorRepository connectorRepository) { super(connectorRepository); } @Override public void afterInsert(final Connection connection, final String connectorId, final TableMetaData table) throws SQLException { System.gc(); } @Override public void beforeTableCopy(final Connection connection, final String connectorId, final TableMetaData table) throws SQLException { ((ExportDumpConnection) connection).initializeWriteTableData(table); } @Override public void afterTableCopy(final Connection connection, final String connectorId, final TableMetaData table) throws SQLException { ((ExportDumpConnection) connection).finalizeWriteTableData(table); } @Override public void beforeNewRow(final Connection connection, final String connectorId, final TableMetaData table) throws SQLException { ((ExportDumpConnection) connection).initializeWriteRowData(table); } @Override public void afterNewRow(final Connection connection, final String connectorId, final TableMetaData table) throws SQLException { ((ExportDumpConnection) connection).finalizeWriteRowData(table); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy