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
public abstract class ConnectionSourceBase extends ContextAwareBase implements ConnectionSource
-
-
Constructor Summary
Constructors Constructor Description ConnectionSourceBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
discoverConnectionProperties()
Learn relevant information about this connection source.java.lang.String
getPassword()
Get the password for this connection source.SQLDialectCode
getSQLDialectCode()
Get the SQL dialect that should be used for this connection.java.lang.String
getUser()
Get the user for this connection source.boolean
isStarted()
void
setPassword(java.lang.String password)
Sets the password.void
setUser(java.lang.String username)
Sets the username.void
start()
void
stop()
boolean
supportsBatchUpdates()
Does this connection support batch updates?boolean
supportsGetGeneratedKeys()
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, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.db.ConnectionSource
getConnection
-
-
-
-
Method Detail
-
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
public final SQLDialectCode 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
public final java.lang.String getPassword()
Get the password for this connection source.
-
setPassword
public final void setPassword(java.lang.String password)
Sets the password.- Parameters:
password
- The password to set
-
getUser
public final java.lang.String getUser()
Get the user for this connection source.
-
setUser
public final void setUser(java.lang.String username)
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
-
-