Clover coverage report - brownies library - 1.0-beta-1
Coverage timestamp: 月 8 16 2004 17:14:42 GMT+09:00
file stats: LOC: 89   Methods: 4
NCLOC: 18   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
LogConnectionFilter.java - 0% 0% 0%
coverage
 1   
 /*
 2   
  * Joey and its relative products are published under the terms
 3   
  * of the Apache Software License.
 4   
  */
 5   
 /*
 6   
  * Created on 2004/02/15
 7   
  */
 8   
 package org.asyrinx.brownie.jdbc.logger;
 9   
 
 10   
 import java.sql.Connection;
 11   
 
 12   
 import org.asyrinx.brownie.core.log.CascadeNamedLog;
 13   
 import org.asyrinx.brownie.core.log.DispatchLog;
 14   
 
 15   
 /**
 16   
  * Statement, PreparedStatement, CallableStatementの実行時に
 17   
  * 実行したSQLをログに出力するフィルタをかけるConnectionのフィルタです。 <br>
 18   
  * 使用方法は通常のConnectionと変わりません。 <br>
 19   
  * もちろんcreateStatement等で生成されるStatement, PreparedStatement, CallableStatement
 20   
  * 等についても同様です。 <br>
 21   
  * 
 22   
  * @see java.sql.Statement
 23   
  * @see java.sql.PreparedStatement
 24   
  * @see java.sql.CallableStatement
 25   
  * @see java.sql.Connection
 26   
  * @author akima
 27   
  */
 28   
 public class LogConnectionFilter {
 29   
 
 30   
     /**
 31   
      * ログフィルタがかけられたコネクションを返します。 <br>
 32   
      * 出力先のログは自動的に生成されます。 <br>
 33   
      * ログの出力レベルは"debug"です。 <br>
 34   
      * ログの名称はconnectionのクラス名です。 <br>
 35   
      * 
 36   
      * @see LogConnectionFilter#log(Connection, Log)
 37   
      * @param connection
 38   
      *            対象となるコネクション
 39   
      */
 40  0
     public static Connection log(Connection connection) {
 41  0
         return log(connection, connection.getClass().getName());
 42   
     }
 43   
 
 44   
     /**
 45   
      * ログフィルタがかけられたコネクションを返します。 <br>
 46   
      * 出力先のログは自動的に生成されます。 <br>
 47   
      * ログの出力レベルは"debug"です。 <br>
 48   
      * ログの名称はconnectionのクラス名です。 <br>
 49   
      * 
 50   
      * @see LogConnectionFilter#log(Connection, Log)
 51   
      * @param connection
 52   
      *            対象となるコネクション
 53   
      */
 54  0
     public static Connection log(Connection connection, String loggerName) {
 55  0
         return log(connection, loggerName, DispatchLog.DEFAULT_LEVEL);
 56   
     }
 57   
 
 58   
     /**
 59   
      * ログフィルタがかけられたコネクションを返します。 <br>
 60   
      * 出力先のログは自動的に生成されます。 <br>
 61   
      * ログの出力レベルは"debug"です。 <br>
 62   
      * ログの名称はconnectionのクラス名です。 <br>
 63   
      * 
 64   
      * @see LogConnectionFilter#log(Connection, Log)
 65   
      * @param connection
 66   
      *            対象となるコネクション
 67   
      */
 68  0
     public static Connection log(Connection connection, String loggerName,
 69   
             String logLevel) {
 70  0
         return log(connection, new CascadeNamedLog(loggerName, logLevel));
 71   
     }
 72   
 
 73   
     /**
 74   
      * ログフィルタがかけられたコネクションを返します。 <br>
 75   
      * 出力先のログは自動的に生成されます。 <br>
 76   
      * ログの出力レベルは"debug"です。 <br>
 77   
      * ログの名称はconnectionのクラス名です。 <br>
 78   
      * 
 79   
      * @see LogConnectionFilter#log(Connection, Log)
 80   
      * @param connection
 81   
      *            対象となるコネクション
 82   
      * @param log
 83   
      *            出力先となるログ
 84   
      */
 85  0
     public static Connection log(Connection connection, CascadeNamedLog log) {
 86  0
         return new LogConnection(connection, log);
 87   
     }
 88   
 
 89   
 }