@ThreadSafe public abstract class AbstractDBConnector extends Object implements IHasDataSource, Closeable
IHasDataSource based on
BasicDataSource implementation.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.dbcp2.BasicDataSource |
m_aDataSource |
| Constructor and Description |
|---|
AbstractDBConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract String |
getConnectionUrl() |
DataSource |
getDataSource()
Retrieve a data source.
|
protected abstract String |
getJDBCDriverClassName() |
protected com.helger.commons.concurrent.SimpleLock |
getLock() |
protected abstract String |
getPassword() |
protected abstract String |
getUserName() |
protected boolean |
isPoolPreparedStatements() |
protected boolean |
isUseDefaultAutoCommit() |
String |
toString() |
@Nonnull protected final com.helger.commons.concurrent.SimpleLock getLock()
@Nonnull public abstract String getConnectionUrl()
null.@OverrideOnDemand protected boolean isUseDefaultAutoCommit()
@OverrideOnDemand protected boolean isPoolPreparedStatements()
@Nonnull public final DataSource getDataSource()
IHasDataSourcegetDataSource in interface IHasDataSourcenull data source.public final void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2014–2021 Philip Helger. All rights reserved.