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