1 package net.sourceforge.jdbclogger.oracle10g; 2 18 import net.sourceforge.jdbclogger.core.ParameterFormatter; 19 20 import java.text.DateFormat ; 21 import java.text.SimpleDateFormat ; 22 import java.util.Date ; 23 24 28 public class JdbcLoggerOracleDateParameterFormatterImpl implements ParameterFormatter 29 { 30 private static DateFormat _df = new SimpleDateFormat ("ddMMyyyy HHmmss"); 31 32 public Class getFormattingClass () 33 { 34 return Date .class; 35 } 36 37 public String format (Object paramObj) 38 { 39 if (paramObj == null) 40 return "null"; 41 42 return "to_date('" + _df.format ((Date )paramObj) + "', 'DDMMYYYY HH24MISS')"; 43 } 44 } 45 | Popular Tags |