Package com.ibatis.sqlmap.engine.type
Class UnknownTypeHandler
java.lang.Object
com.ibatis.sqlmap.engine.type.BaseTypeHandler
com.ibatis.sqlmap.engine.type.UnknownTypeHandler
- All Implemented Interfaces:
TypeHandler
Implementation of TypeHandler for dealing with unknown types.
-
Constructor Summary
ConstructorsConstructorDescriptionUnknownTypeHandler(TypeHandlerFactory factory) Constructor to create via a factory. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares two values (that this handler deals with) for equality.getResult(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.voidsetParameter(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.
-
Constructor Details
-
UnknownTypeHandler
Constructor to create via a factory.- Parameters:
factory- - the factory to associate this with
-
-
Method Details
-
setParameter
public void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws SQLException Description copied from interface:TypeHandlerSets a parameter on a prepared statement.- Specified by:
setParameterin 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:TypeHandlerGets a column from a result set.- Specified by:
getResultin 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:TypeHandlerGets a column from a result set.- Specified by:
getResultin 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:TypeHandlerGets a column from a callable statement.- Specified by:
getResultin 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:TypeHandlerConverts the String to the type that this handler deals with.- Specified by:
valueOfin interfaceTypeHandler- Parameters:
s- - the String value- Returns:
- - the converted value
-
equals
Description copied from interface:TypeHandlerCompares two values (that this handler deals with) for equality.- Specified by:
equalsin interfaceTypeHandler- Overrides:
equalsin classBaseTypeHandler- Parameters:
object- - one of the objectsstring- - the other object as a String- Returns:
- - true if they are equal
-