protected SQLExceptionConverter getSQLExceptionConverter() { return getSQLExceptionHelper().getSqlExceptionConverter(); }
/** * Retrieves the SQLExceptionConverter in effect for this SessionFactory. * * @return The SQLExceptionConverter for this SessionFactory. * * @deprecated since 5.0; use {@link JdbcServices#getSqlExceptionHelper()} -> * {@link SqlExceptionHelper#getSqlExceptionConverter()} instead as obtained from {@link #getServiceRegistry()} */ @Deprecated default SQLExceptionConverter getSQLExceptionConverter() { return getServiceRegistry().getService( JdbcServices.class ).getSqlExceptionHelper().getSqlExceptionConverter(); }
public SQLExceptionConverter getSQLExceptionConverter() { return getSQLExceptionHelper().getSqlExceptionConverter(); }
protected SQLExceptionConverter getSQLExceptionConverter() { return getSQLExceptionHelper().getSqlExceptionConverter(); }
public SQLExceptionConverter getSQLExceptionConverter() { return getSQLExceptionHelper().getSqlExceptionConverter(); }
protected SQLExceptionConverter getSQLExceptionConverter() { return getSQLExceptionHelper().getSqlExceptionConverter(); }
/** * Retrieves the SQLExceptionConverter in effect for this SessionFactory. * * @return The SQLExceptionConverter for this SessionFactory. * * @deprecated since 5.0; use {@link JdbcServices#getSqlExceptionHelper()} -> * {@link SqlExceptionHelper#getSqlExceptionConverter()} instead as obtained from {@link #getServiceRegistry()} */ @Deprecated default SQLExceptionConverter getSQLExceptionConverter() { return getServiceRegistry().getService( JdbcServices.class ).getSqlExceptionHelper().getSqlExceptionConverter(); }
public static JDBCReader newJDBCReader( Properties properties, ReverseEngineeringStrategy revengStrategy, MetaDataDialect mdd, ServiceRegistry serviceRegistry) { SQLExceptionConverter sqlExceptionConverter = serviceRegistry .getService(JdbcServices.class) .getSqlExceptionHelper() .getSqlExceptionConverter(); ConnectionProvider connectionProvider = serviceRegistry .getService(ConnectionProvider.class); String defaultCatalogName = properties .getProperty(AvailableSettings.DEFAULT_CATALOG); String defaultSchemaName = properties .getProperty(AvailableSettings.DEFAULT_SCHEMA); return new JDBCReader( mdd, connectionProvider, sqlExceptionConverter, defaultCatalogName, defaultSchemaName, revengStrategy ); }
public static JDBCReader newJDBCReader( Properties properties, ReverseEngineeringStrategy revengStrategy, MetaDataDialect mdd, ServiceRegistry serviceRegistry) { SQLExceptionConverter sqlExceptionConverter = serviceRegistry .getService(JdbcServices.class) .getSqlExceptionHelper() .getSqlExceptionConverter(); ConnectionProvider connectionProvider = serviceRegistry .getService(ConnectionProvider.class); String defaultCatalogName = properties .getProperty(AvailableSettings.DEFAULT_CATALOG); String defaultSchemaName = properties .getProperty(AvailableSettings.DEFAULT_SCHEMA); return new JDBCReader( mdd, connectionProvider, sqlExceptionConverter, defaultCatalogName, defaultSchemaName, revengStrategy ); }
@Test public void testDataType() { MetaDataDialect dialect = MetaDataDialectFactory .fromDialectName(properties.getProperty(AvailableSettings.DIALECT)); JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class); ConnectionProvider connectionProvider = serviceRegistry.getService(ConnectionProvider.class); dialect.configure( ReverseEngineeringRuntimeInfo.createInstance( connectionProvider, jdbcServices.getSqlExceptionHelper().getSqlExceptionConverter(), new DefaultDatabaseCollector(dialect))); String catalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); String schema = properties.getProperty(AvailableSettings.DEFAULT_SCHEMA); Iterator<?> tables = dialect.getColumns( catalog, schema, "test", null ); while(tables.hasNext()) { Map<?,?> map = (Map<?,?>) tables.next(); System.out.println(map); } }
ReverseEngineeringRuntimeInfo.createInstance( connectionProvider, jdbcServices.getSqlExceptionHelper().getSqlExceptionConverter(), new DefaultDatabaseCollector(dialect))); String catalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG);
@Test public void testCaseTest() { MetaDataDialect dialect = new JDBCMetaDataDialect(); JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class); ConnectionProvider connectionProvider = serviceRegistry.getService(ConnectionProvider.class); dialect.configure( ReverseEngineeringRuntimeInfo.createInstance( connectionProvider, jdbcServices.getSqlExceptionHelper().getSqlExceptionConverter(), new DefaultDatabaseCollector(dialect))); String catalog = properties.getProperty(AvailableSettings.DEFAULT_CATALOG); String schema = properties.getProperty(AvailableSettings.DEFAULT_SCHEMA); Iterator<Map<String, Object>> tables = dialect.getTables( catalog, schema, "TAB_MASTER"); JUnitUtil.assertIteratorContainsExactly(null, tables, 1); }