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

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

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


Constructor Summary
BaseTypeHandler()
           
 
Method Summary
abstract  T getNullableResult(CallableStatement cs, int columnIndex)
           
abstract  T getNullableResult(ResultSet rs, String columnName)
           
 T getResult(CallableStatement cs, int columnIndex)
           
 T getResult(ResultSet rs, String columnName)
           
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseTypeHandler

public BaseTypeHandler()
Method Detail

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(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(CallableStatement cs,
                                    int columnIndex)
                             throws SQLException
Throws:
SQLException


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