Search in sources :

Example 1 with ExtractionContext

use of org.hibernate.tool.schema.extract.spi.ExtractionContext in project hibernate-orm by hibernate.

the class TestExtraPhysicalTableTypes method buildInformationExtractorJdbcDatabaseMetaDataImplTest.

private InformationExtractorJdbcDatabaseMetaDataImplTest buildInformationExtractorJdbcDatabaseMetaDataImplTest() throws SQLException {
    Database database = metadata.getDatabase();
    final ConnectionProvider connectionProvider = ssr.getService(ConnectionProvider.class);
    DatabaseInformation dbInfo = new DatabaseInformationImpl(ssr, database.getJdbcEnvironment(), new DdlTransactionIsolatorTestingImpl(ssr, new JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess(connectionProvider)), database.getDefaultNamespace().getName());
    ExtractionContextImpl extractionContext = new ExtractionContextImpl(ssr, database.getJdbcEnvironment(), ssr.getService(JdbcServices.class).getBootstrapJdbcConnectionAccess(), (ExtractionContext.DatabaseObjectAccess) dbInfo, database.getDefaultNamespace().getPhysicalName().getCatalog(), database.getDefaultNamespace().getPhysicalName().getSchema());
    return new InformationExtractorJdbcDatabaseMetaDataImplTest(extractionContext);
}
Also used : DdlTransactionIsolatorTestingImpl(org.hibernate.test.util.DdlTransactionIsolatorTestingImpl) DatabaseInformation(org.hibernate.tool.schema.extract.spi.DatabaseInformation) ExtractionContext(org.hibernate.tool.schema.extract.spi.ExtractionContext) Database(org.hibernate.boot.model.relational.Database) DatabaseInformationImpl(org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl) ExtractionContextImpl(org.hibernate.tool.schema.extract.internal.ExtractionContextImpl) ConnectionProvider(org.hibernate.engine.jdbc.connections.spi.ConnectionProvider)

Aggregations

Database (org.hibernate.boot.model.relational.Database)1 ConnectionProvider (org.hibernate.engine.jdbc.connections.spi.ConnectionProvider)1 DdlTransactionIsolatorTestingImpl (org.hibernate.test.util.DdlTransactionIsolatorTestingImpl)1 DatabaseInformationImpl (org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl)1 ExtractionContextImpl (org.hibernate.tool.schema.extract.internal.ExtractionContextImpl)1 DatabaseInformation (org.hibernate.tool.schema.extract.spi.DatabaseInformation)1 ExtractionContext (org.hibernate.tool.schema.extract.spi.ExtractionContext)1