public static class TopiaUtil.ConnectionProviderSupplier extends Object implements com.google.common.base.Supplier<org.hibernate.engine.jdbc.connections.spi.ConnectionProvider>, Closeable
Supplier<ConnectionProvider>. The provider will choose the best way to find the
ConnectionProvider depending on the way is has been created.| Modifier and Type | Field and Description |
|---|---|
protected org.hibernate.engine.jdbc.connections.spi.ConnectionProvider |
connectionProvider |
protected org.hibernate.SessionFactory |
sessionFactory
If provided, the SessionFactory will be used instead of the StandardServiceRegistry
|
protected org.hibernate.boot.registry.StandardServiceRegistry |
standardServiceRegistry
StandardServiceRegistry will be used if no SessionFactory is provided
|
| Constructor and Description |
|---|
ConnectionProviderSupplier(org.hibernate.cfg.Configuration configuration) |
ConnectionProviderSupplier(TopiaHibernateSupport topiaHibernateSupport) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.hibernate.engine.jdbc.connections.spi.ConnectionProvider |
get() |
protected org.hibernate.SessionFactory sessionFactory
protected org.hibernate.boot.registry.StandardServiceRegistry standardServiceRegistry
protected org.hibernate.engine.jdbc.connections.spi.ConnectionProvider connectionProvider
public ConnectionProviderSupplier(TopiaHibernateSupport topiaHibernateSupport)
public ConnectionProviderSupplier(org.hibernate.cfg.Configuration configuration)
public org.hibernate.engine.jdbc.connections.spi.ConnectionProvider get()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2004–2019 CodeLutin. All rights reserved.