1 package net.sourceforge.jdbclogger.core; 2 18 import java.text.DateFormat ; 19 import java.text.SimpleDateFormat ; 20 import java.util.Date ; 21 22 26 public class DateParameterFormatterImpl implements ParameterFormatter 27 { 28 private static DateFormat _df = new SimpleDateFormat ("dd.MM.yyyy HH:mm:ss"); 29 30 public Class getFormattingClass () 31 { 32 return Date .class; 33 } 34 35 public String format (Object paramObj) 36 { 37 if (paramObj == null) 38 return "null"; 39 40 return "'" + _df.format ((Date )paramObj) + "'"; 41 } 42 } 43 | Popular Tags |