ch.qos.logback.core.db
Class ConnectionSourceBase

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by 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

Author:
Ceki Gülcü

Field Summary
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
ConnectionSourceBase()
           
 
Method Summary
 void discoverConnnectionProperties()
          Learn relevant information about this connection source.
 String getPassword()
          Get the password for this connection source.
 SQLDialectCode getSQLDialectCode()
          Get the SQL dialect that should be used for this connection.
 String getUser()
          Get the user for this connection source.
 boolean isStarted()
           
 void setPassword(String password)
          Sets the password.
 void setUser(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, 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 Detail

ConnectionSourceBase

public ConnectionSourceBase()
Method Detail

discoverConnnectionProperties

public void discoverConnnectionProperties()
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 interface ConnectionSource

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 interface ConnectionSource

getPassword

public final String getPassword()
Get the password for this connection source.


setPassword

public final void setPassword(String password)
Sets the password.

Parameters:
password - The password to set

getUser

public final String getUser()
Get the user for this connection source.


setUser

public final void setUser(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 interface ConnectionSource

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle

start

public void start()
Specified by:
start in interface LifeCycle

stop

public void stop()
Specified by:
stop in interface LifeCycle


Copyright © 2005-2012 QOS.ch. All Rights Reserved.