};
}
public void testExportedKeys() {
MetaDataDialect dialect = new JDBCMetaDataDialect();
StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
ServiceRegistry serviceRegistry = builder.build();
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Settings settings = cfg.buildSettings(serviceRegistry);
dialect.configure( ReverseEngineeringRuntimeInfo.createInstance(jdbcServices.getConnectionProvider(),
jdbcServices.getSqlExceptionHelper().getSqlExceptionConverter(), new DefaultDatabaseCollector(dialect)));
Iterator tables = dialect.getTables( settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), identifier("tab_master") );
boolean foundMaster = false;
while(tables.hasNext()) {
Map map = (Map) tables.next();
String tableName = (String) map.get("TABLE_NAME");
String schemaName = (String) map.get("TABLE_SCHEM");
String catalogName = (String) map.get("TABLE_CAT");
if(tableName.equals(identifier("tab_master"))) {
foundMaster = true;
Iterator exportedKeys = dialect.getExportedKeys( catalogName, schemaName, tableName );
int cnt = 0;
while ( exportedKeys.hasNext() ) {
Map element = (Map) exportedKeys.next();
cnt++;
}