Package org.apache.ofbiz.base.conversion
Class DateTimeConverters.CalendarToTimestamp
java.lang.Object
org.apache.ofbiz.base.conversion.AbstractConverter<com.ibm.icu.util.Calendar,Timestamp>
org.apache.ofbiz.base.conversion.DateTimeConverters.CalendarToTimestamp
- All Implemented Interfaces:
Converter<com.ibm.icu.util.Calendar,
,Timestamp> ConverterLoader
- Enclosing class:
- DateTimeConverters
public static class DateTimeConverters.CalendarToTimestamp
extends AbstractConverter<com.ibm.icu.util.Calendar,Timestamp>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canConvert
(Class<?> sourceClass, Class<?> targetClass) Returnstrue
if this object can convertsourceClass
totargetClass
.convert
(com.ibm.icu.util.Calendar obj) Convertsobj
toT
.Methods inherited from class org.apache.ofbiz.base.conversion.AbstractConverter
convert, getSourceClass, getTargetClass, loadConverters
-
Constructor Details
-
CalendarToTimestamp
public CalendarToTimestamp()
-
-
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<com.ibm.icu.util.Calendar,
Timestamp> - Overrides:
canConvert
in classAbstractConverter<com.ibm.icu.util.Calendar,
Timestamp> - Parameters:
sourceClass
- The sourceClass
targetClass
- The targetClass
- Returns:
true
if this object can convertsourceClass
totargetClass
.
-
convert
Description copied from interface:Converter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convert- Returns:
- The converted
Object
- Throws:
ConversionException
-