com.vividsolutions.jump.datastore.jdbc
Class ValueConverterFactory

java.lang.Object
  extended by com.vividsolutions.jump.datastore.jdbc.ValueConverterFactory

public class ValueConverterFactory
extends java.lang.Object

Standard data converters for JDBC. Clients can extend this class, or simply call it.

Version:
1.0
Author:
Martin Davis

Nested Class Summary
static class ValueConverterFactory.DateConverter
           
static class ValueConverterFactory.DoubleConverter
           
static class ValueConverterFactory.IntegerConverter
           
static class ValueConverterFactory.StringConverter
           
 
Field Summary
static ValueConverter DATE_MAPPER
           
static ValueConverter DOUBLE_MAPPER
           
static ValueConverter INTEGER_MAPPER
           
static ValueConverter STRING_MAPPER
           
 
Constructor Summary
ValueConverterFactory()
           
 
Method Summary
static ValueConverter getConverter(java.sql.ResultSetMetaData rsm, int columnIndex)
          Handles finding a converter for standard JDBC types.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOUBLE_MAPPER

public static final ValueConverter DOUBLE_MAPPER

INTEGER_MAPPER

public static final ValueConverter INTEGER_MAPPER

DATE_MAPPER

public static final ValueConverter DATE_MAPPER

STRING_MAPPER

public static final ValueConverter STRING_MAPPER
Constructor Detail

ValueConverterFactory

public ValueConverterFactory()
Method Detail

getConverter

public static ValueConverter getConverter(java.sql.ResultSetMetaData rsm,
                                          int columnIndex)
                                   throws java.sql.SQLException
Handles finding a converter for standard JDBC types. Clients should handle custom types themselves.

Parameters:
rsm -
columnIndex -
Returns:
null if no converter could be found
Throws:
java.sql.SQLException