Package org.apache.ofbiz.base.conversion
Class DateTimeConverters.StringToTimestamp
- 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<java.lang.String,java.sql.Timestamp>
-
- org.apache.ofbiz.base.conversion.DateTimeConverters.StringToTimestamp
-
- All Implemented Interfaces:
Converter<java.lang.String,java.sql.Timestamp>
,ConverterLoader
,LocalizedConverter<java.lang.String,java.sql.Timestamp>
- Enclosing class:
- DateTimeConverters
public static class DateTimeConverters.StringToTimestamp extends DateTimeConverters.GenericLocalizedConverter<java.lang.String,java.sql.Timestamp>
-
-
Constructor Summary
Constructors Constructor Description StringToTimestamp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canConvert(java.lang.Class<?> sourceClass, java.lang.Class<?> targetClass)
Returnstrue
if this object can convertsourceClass
totargetClass
.java.sql.Timestamp
convert(java.lang.String obj, java.util.Locale locale, java.util.TimeZone timeZone, java.lang.String formatString)
Convertsobj
toT
.-
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
-
-
-
-
Method Detail
-
canConvert
public boolean canConvert(java.lang.Class<?> sourceClass, java.lang.Class<?> targetClass)
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<java.lang.String,java.sql.Timestamp>
- Overrides:
canConvert
in classAbstractConverter<java.lang.String,java.sql.Timestamp>
- Parameters:
sourceClass
- The sourceClass
targetClass
- The targetClass
- Returns:
true
if this object can convertsourceClass
totargetClass
.
-
convert
public java.sql.Timestamp convert(java.lang.String obj, java.util.Locale locale, java.util.TimeZone timeZone, java.lang.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
-
-