Package ch.qos.logback.core.db
Class ConnectionSourceBase
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.db.ConnectionSourceBase
- All Implemented Interfaces:
ConnectionSource,ContextAware,LifeCycle
- Direct Known Subclasses:
DataSourceConnectionSource,DriverManagerConnectionSource,JNDIConnectionSource
- Author:
- Ceki Gülcü
-
Field Summary
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLearn relevant information about this connection source.Get the password for this connection source.Get the SQL dialect that should be used for this connection.getUser()Get the user for this connection source.booleanvoidsetPassword(String password)Sets the password.voidSets the username.voidstart()voidstop()booleanDoes this connection support batch updates?booleanDoes this connection support the JDBC Connection.getGeneratedKeys method?Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.db.ConnectionSource
getConnection
-
Constructor Details
-
ConnectionSourceBase
public ConnectionSourceBase()
-
-
Method Details
-
discoverConnectionProperties
public void discoverConnectionProperties()Learn relevant information about this connection source. -
supportsGetGeneratedKeys
public final boolean supportsGetGeneratedKeys()Does this connection support the JDBC Connection.getGeneratedKeys method?- Specified by:
supportsGetGeneratedKeysin interfaceConnectionSource
-
getSQLDialectCode
Description copied from interface:ConnectionSourceGet the SQL dialect that should be used for this connection. Note that the dialect is not needed if the JDBC driver supports the getGeneratedKeys method.- Specified by:
getSQLDialectCodein interfaceConnectionSource
-
getPassword
Get the password for this connection source. -
setPassword
Sets the password.- Parameters:
password- The password to set
-
getUser
Get the user for this connection source. -
setUser
Sets the username.- Parameters:
username- The username to set
-
supportsBatchUpdates
public final boolean supportsBatchUpdates()Does this connection support batch updates?- Specified by:
supportsBatchUpdatesin interfaceConnectionSource
-
isStarted
public boolean isStarted() -
start
public void start() -
stop
public void stop()
-