Package org.apache.ofbiz.base.conversion
Class DateTimeConverters.DateToSqlTime
- java.lang.Object
-
- org.apache.ofbiz.base.conversion.AbstractConverter<java.util.Date,java.sql.Time>
-
- org.apache.ofbiz.base.conversion.DateTimeConverters.DateToSqlTime
-
- All Implemented Interfaces:
Converter<java.util.Date,java.sql.Time>
,ConverterLoader
- Enclosing class:
- DateTimeConverters
public static class DateTimeConverters.DateToSqlTime extends AbstractConverter<java.util.Date,java.sql.Time>
-
-
Constructor Summary
Constructors Constructor Description DateToSqlTime()
-
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.util.Date obj)
Convertsobj
toT
.-
Methods inherited from class org.apache.ofbiz.base.conversion.AbstractConverter
convert, getSourceClass, getTargetClass, loadConverters
-
-
-
-
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.util.Date,java.sql.Time>
- Overrides:
canConvert
in classAbstractConverter<java.util.Date,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.util.Date obj) throws ConversionException
Description copied from interface:Converter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convert- Returns:
- The converted
Object
- Throws:
ConversionException
-
-