Package com.ibatis.sqlmap.engine.type
Class StringTypeHandler
java.lang.Object
com.ibatis.sqlmap.engine.type.BaseTypeHandler
com.ibatis.sqlmap.engine.type.StringTypeHandler
- All Implemented Interfaces:
TypeHandler
String implementation of TypeHandler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResult
(CallableStatement cs, int columnIndex) Gets a column from a callable statement.Gets a column from a result set.Gets a column from a result set.void
setParameter
(PreparedStatement ps, int i, Object parameter, String jdbcType) Sets a parameter on a prepared statement.Converts the String to the type that this handler deals with.Methods inherited from class com.ibatis.sqlmap.engine.type.BaseTypeHandler
equals
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibatis.sqlmap.engine.type.TypeHandler
equals
-
Constructor Details
-
StringTypeHandler
public StringTypeHandler()
-
-
Method Details
-
setParameter
public void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws SQLException Description copied from interface:TypeHandler
Sets a parameter on a prepared statement.- Specified by:
setParameter
in interfaceTypeHandler
- Parameters:
ps
- - the prepared statementi
- - the parameter indexparameter
- - the parameter valuejdbcType
- - the JDBC type of the parameter- Throws:
SQLException
- if setting the parameter fails
-
getResult
Description copied from interface:TypeHandler
Gets a column from a result set.- Specified by:
getResult
in interfaceTypeHandler
- Parameters:
rs
- - the result setcolumnName
- - the column name to get- Returns:
- - the column value
- Throws:
SQLException
- if getting the value fails
-
getResult
Description copied from interface:TypeHandler
Gets a column from a result set.- Specified by:
getResult
in interfaceTypeHandler
- Parameters:
rs
- - the result setcolumnIndex
- - the column to get (by index)- Returns:
- - the column value
- Throws:
SQLException
- if getting the value fails
-
getResult
Description copied from interface:TypeHandler
Gets a column from a callable statement.- Specified by:
getResult
in interfaceTypeHandler
- Parameters:
cs
- - the statementcolumnIndex
- - the column to get (by index)- Returns:
- - the column value
- Throws:
SQLException
- if getting the value fails
-
valueOf
Description copied from interface:TypeHandler
Converts the String to the type that this handler deals with.- Specified by:
valueOf
in interfaceTypeHandler
- Parameters:
s
- - the String value- Returns:
- - the converted value
-