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 TypeMethodDescriptionvoid
Learn 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.boolean
void
setPassword(String password)
Sets the password.void
Sets the username.void
start()
void
stop()
boolean
Does this connection support batch updates?boolean
Does 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, setContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
supportsGetGeneratedKeys
in interfaceConnectionSource
-
getSQLDialectCode
Description copied from interface:ConnectionSource
Get 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:
getSQLDialectCode
in 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:
supportsBatchUpdates
in interfaceConnectionSource
-
isStarted
public boolean isStarted() -
start
public void start() -
stop
public void stop()
-