If you use Maven add the following dependency to your pom.xml file to get started using GuttenBase:

<dependency>
  <groupId>de.akquinet.jbosscc.guttenbase</groupId>
  <artifactId>GuttenBase</artifactId>
  <version>2.0.0</version>
</dependency>
 

The following code example first checks whether the source and destination are compatible. Then the values from the source database are written to the target database. Finally, we perform (empirical) tests whether the data has been transmitted correctly.

In many cases, that's it!

final ConnectorRepository connectorRepository = new ConnectorRepositoryImpl();
connectorRepository.addConnectionInfo("MySql", new AevMySqlConnectionInfo());
connectorRepository.addConnectionInfo("Postgresql", new AevPostgresqlConnectionInfo());

new CheckSchemaCompatibilityTool(connectorRepository).checkTableConfiguration("MySql",
        "Postgresql");
new DefaultTableCopyTool(connectorRepository).copyTables("MySql", "Postgresql");
new CheckEqualTableDataTool(connectorRepository).checkTableData("MySql", "Postgresql");