io.hypersistence.utils.test.providers.DataSourceProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hypersistence-utils-hibernate-62 Show documentation
Show all versions of hypersistence-utils-hibernate-62 Show documentation
Utilities for Spring and Hibernate ORM 6.2 or newer
package io.hypersistence.utils.test.providers;
import org.hibernate.dialect.Database;
import org.testcontainers.containers.JdbcDatabaseContainer;
import javax.sql.DataSource;
/**
* @author Vlad Mihalcea
*/
public interface DataSourceProvider {
Database database();
String hibernateDialect();
DataSource dataSource();
String url();
String username();
String password();
default JdbcDatabaseContainer newJdbcDatabaseContainer() {
throw new UnsupportedOperationException(
String.format(
"The [%s] database was not configured to use Testcontainers!",
database()
)
);
}
default boolean supportsDatabaseName() {
return true;
}
default boolean supportsCredentials() {
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy