Package com.im.commons.db
Class SQLWriterRegistry.SQLDateWriter
- java.lang.Object
-
- com.im.commons.db.SQLWriterRegistry.SQLDateWriter
-
- All Implemented Interfaces:
SQLWriter.SQLValueWriter
,java.io.Serializable
- Enclosing class:
- SQLWriterRegistry
public static final class SQLWriterRegistry.SQLDateWriter extends java.lang.Object implements SQLWriter.SQLValueWriter, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SQLDateWriter(java.lang.String sqlFormat, java.lang.String dateFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
writeValueToSQL(java.lang.Object value)
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SQLDateWriter
public SQLDateWriter(java.lang.String sqlFormat, java.lang.String dateFormat)
- Parameters:
sqlFormat
- The string that is written to the SQL as a MessageFormat string. e.g DATE(''{0}'') [note: the quote marks need double quoting ('')]dateFormat
- The format for the date that is needed by the DB e.g. yyyy-MM-dd would generate 2001-12-25 for Christmas day 2001
-
-
Method Detail
-
writeValueToSQL
public java.lang.String writeValueToSQL(java.lang.Object value)
- Specified by:
writeValueToSQL
in interfaceSQLWriter.SQLValueWriter
-
-