Interface SqlTypeConverter
- All Known Implementing Classes:
ByteArrayBase64Converter
,DateConverter
,NumberConverter
,TimeConverter
,TimestampConverter
public interface SqlTypeConverter
Interface for classes that convert between strings and sql data types.
- Version:
- $Revision: 289996 $
-
Method Summary
Modifier and TypeMethodDescriptionconvertFromString
(String textRep, int sqlTypeCode) Converts the given textual representation to an instance of the target type.convertToString
(Object obj, int sqlTypeCode) Converts the given object to a string representation.
-
Method Details
-
convertFromString
Converts the given textual representation to an instance of the target type.- Parameters:
textRep
- The textual representationsqlTypeCode
- The target sql type code, one of the constants inTypes
- Returns:
- The corresponding object
- Throws:
ConversionException
-
convertToString
Converts the given object to a string representation.- Parameters:
obj
- The objectsqlTypeCode
- The corresponding source type code- Returns:
- The textual representation
- Throws:
ConversionException
-