org.apache.log4j.db
インタフェース ConnectionSource

すべてのスーパーインタフェース:
org.apache.log4j.spi.Component, org.apache.log4j.spi.OptionHandler
既知の実装クラスの一覧:
ConnectionSourceSkeleton, DataSourceConnectionSource, DriverManagerConnectionSource, JNDIConnectionSource

public interface ConnectionSource
extends org.apache.log4j.spi.Component, org.apache.log4j.spi.OptionHandler

The ConnectionSource interface provides a pluggable means of transparently obtaining JDBC Connections for log4j classes that require the use of a Connection.

作成者:
Ray DeCampo

フィールドの概要
static int HSQL_DIALECT
           
static int MSSQL_DIALECT
           
static int MYSQL_DIALECT
           
static int ORACLE_DIALECT
           
static int POSTGRES_DIALECT
           
static int UNKNOWN_DIALECT
           
 
メソッドの概要
 java.sql.Connection getConnection()
          Obtain a Connection for use.
 int getSQLDialectCode()
          Get the SQL dialect that should be used for this connection.
 boolean supportsBatchUpdates()
          If the connection does not support batch updates, we will avoid using them.
 boolean supportsGetGeneratedKeys()
          If the connection supports the JDBC 3.0 getGeneratedKeys method, then we do not need any specific dialect support.
 
インタフェース org.apache.log4j.spi.Component から継承されたメソッド
setLoggerRepository
 
インタフェース org.apache.log4j.spi.OptionHandler から継承されたメソッド
activateOptions
 

フィールドの詳細

UNKNOWN_DIALECT

static final int UNKNOWN_DIALECT
関連項目:
定数フィールド値

POSTGRES_DIALECT

static final int POSTGRES_DIALECT
関連項目:
定数フィールド値

MYSQL_DIALECT

static final int MYSQL_DIALECT
関連項目:
定数フィールド値

ORACLE_DIALECT

static final int ORACLE_DIALECT
関連項目:
定数フィールド値

MSSQL_DIALECT

static final int MSSQL_DIALECT
関連項目:
定数フィールド値

HSQL_DIALECT

static final int HSQL_DIALECT
関連項目:
定数フィールド値
メソッドの詳細

getConnection

java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Obtain a Connection for use. The client is responsible for closing the Connection when it is no longer required.

例外:
java.sql.SQLException - if a Connection could not be obtained

getSQLDialectCode

int getSQLDialectCode()
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.


supportsGetGeneratedKeys

boolean supportsGetGeneratedKeys()
If the connection supports the JDBC 3.0 getGeneratedKeys method, then we do not need any specific dialect support.


supportsBatchUpdates

boolean supportsBatchUpdates()
If the connection does not support batch updates, we will avoid using them.



Copyright © 2010 Apache Software Foundation. All Rights Reserved.