org.apache.ibatis.type
Class BaseTypeHandler<T>

java.lang.Object
  extended by org.apache.ibatis.type.TypeReference<T>
      extended by org.apache.ibatis.type.BaseTypeHandler<T>
All Implemented Interfaces:
TypeHandler<T>
Direct Known Subclasses:
ArrayTypeHandler, BigDecimalTypeHandler, BigIntegerTypeHandler, BlobTypeHandler, BooleanTypeHandler, ByteArrayTypeHandler, ByteTypeHandler, CharacterTypeHandler, ClobTypeHandler, DateOnlyTypeHandler, DateTypeHandler, DoubleTypeHandler, EnumOrdinalTypeHandler, EnumTypeHandler, FloatTypeHandler, IntegerTypeHandler, LongTypeHandler, NClobTypeHandler, NStringTypeHandler, ObjectTypeHandler, ShortTypeHandler, SqlDateTypeHandler, SqlTimestampTypeHandler, SqlTimeTypeHandler, StringTypeHandler, TimeOnlyTypeHandler, UnknownTypeHandler

public abstract class BaseTypeHandler<T>
extends TypeReference<T>
implements TypeHandler<T>


Field Summary
protected  Configuration configuration
           
 
Constructor Summary
BaseTypeHandler()
           
 
Method Summary
abstract  T getNullableResult(CallableStatement cs, int columnIndex)
           
abstract  T getNullableResult(ResultSet rs, int columnIndex)
           
abstract  T getNullableResult(ResultSet rs, String columnName)
           
 T getResult(CallableStatement cs, int columnIndex)
           
 T getResult(ResultSet rs, int columnIndex)
           
 T getResult(ResultSet rs, String columnName)
           
 void setConfiguration(Configuration c)
           
abstract  void setNonNullParameter(PreparedStatement ps, int i, T parameter, JdbcType jdbcType)
           
 void setParameter(PreparedStatement ps, int i, T parameter, JdbcType jdbcType)
           
 
Methods inherited from class org.apache.ibatis.type.TypeReference
getRawType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

configuration

protected Configuration configuration
Constructor Detail

BaseTypeHandler

public BaseTypeHandler()
Method Detail

setConfiguration

public void setConfiguration(Configuration c)

setParameter

public void setParameter(PreparedStatement ps,
                         int i,
                         T parameter,
                         JdbcType jdbcType)
                  throws SQLException
Specified by:
setParameter in interface TypeHandler<T>
Throws:
SQLException

getResult

public T getResult(ResultSet rs,
                   String columnName)
            throws SQLException
Specified by:
getResult in interface TypeHandler<T>
Throws:
SQLException

getResult

public T getResult(ResultSet rs,
                   int columnIndex)
            throws SQLException
Specified by:
getResult in interface TypeHandler<T>
Throws:
SQLException

getResult

public T getResult(CallableStatement cs,
                   int columnIndex)
            throws SQLException
Specified by:
getResult in interface TypeHandler<T>
Throws:
SQLException

setNonNullParameter

public abstract void setNonNullParameter(PreparedStatement ps,
                                         int i,
                                         T parameter,
                                         JdbcType jdbcType)
                                  throws SQLException
Throws:
SQLException

getNullableResult

public abstract T getNullableResult(ResultSet rs,
                                    String columnName)
                             throws SQLException
Throws:
SQLException

getNullableResult

public abstract T getNullableResult(ResultSet rs,
                                    int columnIndex)
                             throws SQLException
Throws:
SQLException

getNullableResult

public abstract T getNullableResult(CallableStatement cs,
                                    int columnIndex)
                             throws SQLException
Throws:
SQLException


Copyright © 2010-2012 MyBatis.org. All Rights Reserved.