com.ibatis.db.sqlmap.typehandler
Class StringTypeHandler

java.lang.Object
  extended by com.ibatis.db.sqlmap.typehandler.BaseTypeHandler
      extended by com.ibatis.db.sqlmap.typehandler.StringTypeHandler
All Implemented Interfaces:
TypeHandler

public class StringTypeHandler
extends BaseTypeHandler


Field Summary
private static int BUFFER_SIZE
           
 
Constructor Summary
StringTypeHandler()
           
 
Method Summary
protected  java.lang.Object getNullValue(java.lang.String nullValue)
           
protected  java.lang.Object getValueByIndex(ResultMapping mapping, java.sql.ResultSet rs)
           
protected  java.lang.Object getValueByName(ResultMapping mapping, java.sql.ResultSet rs)
           
 java.lang.Object instantiateValue()
           
 boolean isEqualToNullValue(java.lang.String nullValue, java.lang.Object realValue)
           
 boolean isSimpleType()
           
private static java.lang.String readerToString(java.io.Reader reader)
           
 void setParameter(ParameterMapping mapping, java.sql.PreparedStatement ps, int index, java.lang.Object value)
           
 
Methods inherited from class com.ibatis.db.sqlmap.typehandler.BaseTypeHandler
setBeanProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

private static final int BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

StringTypeHandler

public StringTypeHandler()
Method Detail

getValueByName

protected java.lang.Object getValueByName(ResultMapping mapping,
                                          java.sql.ResultSet rs)
                                   throws java.sql.SQLException
Specified by:
getValueByName in class BaseTypeHandler
Throws:
java.sql.SQLException

getValueByIndex

protected java.lang.Object getValueByIndex(ResultMapping mapping,
                                           java.sql.ResultSet rs)
                                    throws java.sql.SQLException
Specified by:
getValueByIndex in class BaseTypeHandler
Throws:
java.sql.SQLException

getNullValue

protected java.lang.Object getNullValue(java.lang.String nullValue)
                                 throws java.sql.SQLException
Specified by:
getNullValue in class BaseTypeHandler
Throws:
java.sql.SQLException

instantiateValue

public java.lang.Object instantiateValue()

isEqualToNullValue

public boolean isEqualToNullValue(java.lang.String nullValue,
                                  java.lang.Object realValue)

isSimpleType

public boolean isSimpleType()

setParameter

public void setParameter(ParameterMapping mapping,
                         java.sql.PreparedStatement ps,
                         int index,
                         java.lang.Object value)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

readerToString

private static java.lang.String readerToString(java.io.Reader reader)
                                        throws java.sql.SQLException
Throws:
java.sql.SQLException