Package org.apache.ofbiz.base.conversion
Class DateTimeConverters.StringToSqlDate
java.lang.Object
org.apache.ofbiz.base.conversion.AbstractConverter<S,T>
org.apache.ofbiz.base.conversion.AbstractLocalizedConverter<S,T>
org.apache.ofbiz.base.conversion.DateTimeConverters.GenericLocalizedConverter<String,Date>
org.apache.ofbiz.base.conversion.DateTimeConverters.StringToSqlDate
- All Implemented Interfaces:
Converter<String,
,Date> ConverterLoader
,LocalizedConverter<String,
Date>
- Enclosing class:
- DateTimeConverters
public static class DateTimeConverters.StringToSqlDate
extends DateTimeConverters.GenericLocalizedConverter<String,Date>
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.ofbiz.base.conversion.DateTimeConverters.GenericLocalizedConverter
convert, convert
Methods inherited from class org.apache.ofbiz.base.conversion.AbstractLocalizedConverter
convert, convert
Methods inherited from class org.apache.ofbiz.base.conversion.AbstractConverter
convert, getSourceClass, getTargetClass, loadConverters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.ofbiz.base.conversion.Converter
convert, getSourceClass, getTargetClass
-
Constructor Details
-
StringToSqlDate
public StringToSqlDate()
-
-
Method Details
-
canConvert
Description copied from interface:Converter
Returnstrue
if this object can convertsourceClass
totargetClass
.Implementations can accomodate class hierarchy ranges by converting super classes or interfaces.
- Specified by:
canConvert
in interfaceConverter<String,
Date> - Overrides:
canConvert
in classAbstractConverter<String,
Date> - Parameters:
sourceClass
- The sourceClass
targetClass
- The targetClass
- Returns:
true
if this object can convertsourceClass
totargetClass
.
-
convert
public Date convert(String obj, Locale locale, TimeZone timeZone, String formatString) throws ConversionException Description copied from interface:LocalizedConverter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convertlocale
- The locale used for conversion - must not benull
timeZone
- The time zone used for conversion - must not benull
formatString
- Optional formatting string- Returns:
- The converted
Object
- Throws:
ConversionException
-