Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ddlutils.io.converters
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
`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.

Method Detail

### convertFromString

    Object convertFromString(String textRep,
                             int sqlTypeCode)
                             throws ConversionException

  Converts the given textual representation to an instance of the target type.

  Parameters:
    `textRep` - The textual representation
    `sqlTypeCode` - The target sql type code, one of the constants in `Types`
  Returns:
    The corresponding object
  Throws:
    `ConversionException`

### convertToString

    String convertToString(Object obj,
                           int sqlTypeCode)
                           throws ConversionException

  Converts the given object to a string representation.

  Parameters:
    `obj` - The object
    `sqlTypeCode` - The corresponding source type code
  Returns:
    The textual representation
  Throws:
    `ConversionException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.