public class DateConverter extends Object implements SqlTypeConverter
Date and String using the standard
representation "yyyy", or "yyyy-mm", or "yyyy-mm-dd".| Constructor and Description |
|---|
DateConverter()
Creates a new date converter object.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
convertFromString(String textRep,
int sqlTypeCode)
Converts the given textual representation to an instance of the target type.
|
String |
convertToString(Object obj,
int sqlTypeCode)
Converts the given object to a string representation.
|
public Object convertFromString(String textRep, int sqlTypeCode) throws ConversionException
convertFromString in interface SqlTypeConvertertextRep - The textual representationsqlTypeCode - The target sql type code, one of the constants in TypesConversionExceptionpublic String convertToString(Object obj, int sqlTypeCode) throws ConversionException
convertToString in interface SqlTypeConverterobj - The objectsqlTypeCode - The corresponding source type codeConversionExceptionCopyright © 2005-2013 Apache Software Foundation. All Rights Reserved.