Package org.javalite.conversion
Class StringToSqlDateConverter
java.lang.Object
org.javalite.conversion.ConverterAdapter<String,Date>
org.javalite.conversion.StringToSqlDateConverter
- Author:
- Eric Nielsen
-
Constructor Summary
ConstructorDescriptionStringToSqlDateConverter(String pattern)
StringToSqlDateConverter(DateFormat format)
-
Method Summary
Modifier and TypeMethodDescriptionConverts instance of S to T.Methods inherited from class org.javalite.conversion.ConverterAdapter
canConvert, convert
-
Constructor Details
-
StringToSqlDateConverter
- Parameters:
pattern
- pattern to use for conversion
-
StringToSqlDateConverter
- Parameters:
format
- DateFormat to use for conversion
-
-
Method Details
-
sourceClass
- Specified by:
sourceClass
in classConverterAdapter<String,Date>
-
destinationClass
- Specified by:
destinationClass
in classConverterAdapter<String,Date>
-
doConvert
Description copied from class:ConverterAdapter
Converts instance of S to T.- Specified by:
doConvert
in classConverterAdapter<String,Date>
- Parameters:
source
- instance of String or null- Returns:
- source converted to java.sql.Date, or null if source is blank
- Throws:
ParseException
- if conversion failed
-