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
ConstructorDescriptionUnknownTypeHandler
(TypeHandlerFactory factory) Constructor to create via a factory. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares 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.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.
-
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: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
-
equals
Description copied from interface:TypeHandler
Compares two values (that this handler deals with) for equality.- Specified by:
equals
in interfaceTypeHandler
- Overrides:
equals
in classBaseTypeHandler
- Parameters:
object
- - one of the objectsstring
- - the other object as a String- Returns:
- - true if they are equal
-