org.apache.log4j.jdbcplus.examples
Class MyColumnHandler

java.lang.Object
  |
  +--org.apache.log4j.jdbcplus.examples.MyColumnHandler
All Implemented Interfaces:
JDBCColumnHandler

public class MyColumnHandler
extends Object
implements JDBCColumnHandler

simple column handler example

Since:
1.0
Version:
see jdbcappender.jar/META-INF/MANIFEST.MF for version information
Author:
Thomas Fenner

Constructor Summary
MyColumnHandler()
           
 
Method Summary
 Object getObject(LoggingEvent event, String table, String column)
          Defines the Object that is to be logged for this column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyColumnHandler

public MyColumnHandler()
Method Detail

getObject

public Object getObject(LoggingEvent event,
                        String table,
                        String column)
                 throws Exception
Description copied from interface: JDBCColumnHandler
Defines the Object that is to be logged for this column. Make sure the result is accepted as input type for your JDBC driver. For Firebird, this includes for example: BigDecimal, Blob, Boolean, byte[], Date, Double, Float, Integer, Long, Short, String, Time, Timestamp.

Specified by:
getObject in interface JDBCColumnHandler
Parameters:
event - LoggingEvent with message and other details
table - table name
column - column name
Returns:
The Object to log. Type must match allowed types of JDBC driver (see above).
Throws:
Exception - may throw any Exception


Copyright 2000-2004 Apache Software Foundation.