org.apache.ddlutils.io.converters
Class TimeConverter
java.lang.Object
org.apache.ddlutils.io.converters.TimeConverter
- All Implemented Interfaces:
- SqlTypeConverter
- public class TimeConverter
- extends Object
- implements SqlTypeConverter
Converts between Time
and String
using the standard
representation "hh:mm:ss".
- Version:
- $Revision: 289996 $
- Author:
- Thomas Dudziak
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeConverter
public TimeConverter()
convertFromString
public Object convertFromString(String textRep,
int sqlTypeCode)
throws ConversionException
- Converts the given textual representation to an instance of the target type.
- Specified by:
convertFromString
in interface SqlTypeConverter
- Parameters:
textRep
- The textual representationsqlTypeCode
- The target sql type code, one of the constants in Types
- Returns:
- The corresponding object
- Throws:
ConversionException
convertToString
public String convertToString(Object obj,
int sqlTypeCode)
throws ConversionException
- Converts the given object to a string representation.
- Specified by:
convertToString
in interface SqlTypeConverter
- Parameters:
obj
- The objectsqlTypeCode
- The corresponding source type code
- Returns:
- The textual representation
- Throws:
ConversionException
Copyright © 2005 Apache Software Foundation. All Rights Reserved.