Log4j 1.3alpha-8

org.apache.log4j.db
Class ConnectionSourceSkeleton

java.lang.Object
  |
  +--org.apache.log4j.spi.ComponentBase
        |
        +--org.apache.log4j.db.ConnectionSourceSkeleton
All Implemented Interfaces:
Component, ConnectionSource, OptionHandler
Direct Known Subclasses:
DataSourceConnectionSource, DriverManagerConnectionSource, JNDIConnectionSource

public abstract class ConnectionSourceSkeleton
extends ComponentBase
implements ConnectionSource

Author:
Ceki Gülcü

Fields inherited from class org.apache.log4j.spi.ComponentBase
repository
 
Fields inherited from interface org.apache.log4j.db.ConnectionSource
HSQL_DIALECT, MSSQL_DIALECT, MYSQL_DIALECT, ORACLE_DIALECT, POSTGRES_DIALECT, UNKNOWN_DIALECT
 
Constructor Summary
ConnectionSourceSkeleton()
           
 
Method Summary
 void discoverConnnectionProperties()
          Learn relevant information about this connection source.
 String getPassword()
          Get the password for this connection source.
 int getSQLDialectCode()
          Get the SQL dialect that should be used for this connection.
 String getUser()
          Get the user for this connection source.
 void setPassword(String password)
          Sets the password.
 void setUser(String username)
          Sets the username.
 boolean supportsBatchUpdates()
          Does this connection support batch updates?
 boolean supportsGetGeneratedKeys()
          Does this connection support the JDBC Connection.getGeneratedKeys method?
 
Methods inherited from class org.apache.log4j.spi.ComponentBase
getLogger, getLoggerRepository, getNonFloodingLogger, resetErrorCount, setLoggerRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.log4j.db.ConnectionSource
getConnection
 
Methods inherited from interface org.apache.log4j.spi.Component
setLoggerRepository
 
Methods inherited from interface org.apache.log4j.spi.OptionHandler
activateOptions
 

Constructor Detail

ConnectionSourceSkeleton

public ConnectionSourceSkeleton()
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 int 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

Log4j 1.3alpha-8

Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.