Interface TypeHandler
- All Known Implementing Classes:
BaseTypeHandler, BigDecimalTypeHandler, BooleanTypeHandler, ByteArrayTypeHandler, ByteTypeHandler, CustomTypeHandler, DateOnlyTypeHandler, DateTypeHandler, DoubleTypeHandler, EnumTypeHandler, FloatTypeHandler, IntegerTypeHandler, LongTypeHandler, ObjectTypeHandler, ShortTypeHandler, SqlDateTypeHandler, SqlTimestampTypeHandler, SqlTimeTypeHandler, StringTypeHandler, TimeOnlyTypeHandler, UnknownTypeHandler
public interface TypeHandler
Interface for getting data into, and out of a mapped statement.
-
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.
-
Method Details
-
setParameter
void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws SQLException Sets a parameter on a prepared statement.- 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
Gets a column from a result set.- Parameters:
rs- - the result setcolumnName- - the column name to get- Returns:
- - the column value
- Throws:
SQLException- if getting the value fails
-
getResult
Gets a column from a result set.- Parameters:
rs- - the result setcolumnIndex- - the column to get (by index)- Returns:
- - the column value
- Throws:
SQLException- if getting the value fails
-
getResult
Gets a column from a callable statement.- Parameters:
cs- - the statementcolumnIndex- - the column to get (by index)- Returns:
- - the column value
- Throws:
SQLException- if getting the value fails
-
valueOf
-
equals
-