Package org.apache.ofbiz.base.conversion
Class DateTimeConverters.StringToSqlTime
- 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.Time>
-
- org.apache.ofbiz.base.conversion.DateTimeConverters.StringToSqlTime
-
- All Implemented Interfaces:
Converter<java.lang.String,java.sql.Time>
,ConverterLoader
,LocalizedConverter<java.lang.String,java.sql.Time>
- Enclosing class:
- DateTimeConverters
public static class DateTimeConverters.StringToSqlTime extends DateTimeConverters.GenericLocalizedConverter<java.lang.String,java.sql.Time>
-
-
Constructor Summary
Constructors Constructor Description StringToSqlTime()
-
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.Time
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.Time>
- Overrides:
canConvert
in classAbstractConverter<java.lang.String,java.sql.Time>
- Parameters:
sourceClass
- The sourceClass
targetClass
- The targetClass
- Returns:
true
if this object can convertsourceClass
totargetClass
.
-
convert
public java.sql.Time 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
-
-