org.apache.ddlutils.io
Class ConverterConfiguration

java.lang.Object
  extended by org.apache.ddlutils.io.ConverterConfiguration

public class ConverterConfiguration
extends Object

Contains the configuration for converters, which convert between the Java data types corresponding to SQL data, and string representations.

Version:
$Revision: 289996 $

Constructor Summary
ConverterConfiguration()
          Creates a new configuration object with the default converters.
 
Method Summary
 SqlTypeConverter getRegisteredConverter(Table table, Column column)
          Returns the converter registered for the specified column.
 void registerConverter(int sqlTypeCode, SqlTypeConverter converter)
          Registers the given type converter for an sql type.
 void registerConverter(String tableName, String columnName, SqlTypeConverter converter)
          Registers the given type converter for the specified column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterConfiguration

public ConverterConfiguration()
Creates a new configuration object with the default converters.

Method Detail

registerConverter

public void registerConverter(int sqlTypeCode,
                              SqlTypeConverter converter)
Registers the given type converter for an sql type.

Parameters:
sqlTypeCode - The type code, one of the Types constants
converter - The converter

registerConverter

public void registerConverter(String tableName,
                              String columnName,
                              SqlTypeConverter converter)
Registers the given type converter for the specified column.

Parameters:
tableName - The name of the table
columnName - The name of the column
converter - The converter

getRegisteredConverter

public SqlTypeConverter getRegisteredConverter(Table table,
                                               Column column)
Returns the converter registered for the specified column.

Parameters:
table - The table
column - The column
Returns:
The converter


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