Package org.apache.ibatis.type
Class EnumTypeHandler<E extends java.lang.Enum<E>>
- java.lang.Object
-
- org.apache.ibatis.type.TypeReference<T>
-
- org.apache.ibatis.type.BaseTypeHandler<E>
-
- org.apache.ibatis.type.EnumTypeHandler<E>
-
- All Implemented Interfaces:
TypeHandler<E>
public class EnumTypeHandler<E extends java.lang.Enum<E>> extends BaseTypeHandler<E>
- Author:
- Clinton Begin
-
-
Field Summary
-
Fields inherited from class org.apache.ibatis.type.BaseTypeHandler
configuration
-
-
Constructor Summary
Constructors Constructor Description EnumTypeHandler(java.lang.Class<E> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description E
getNullableResult(java.sql.CallableStatement cs, int columnIndex)
E
getNullableResult(java.sql.ResultSet rs, int columnIndex)
E
getNullableResult(java.sql.ResultSet rs, java.lang.String columnName)
void
setNonNullParameter(java.sql.PreparedStatement ps, int i, E parameter, JdbcType jdbcType)
-
Methods inherited from class org.apache.ibatis.type.BaseTypeHandler
getResult, getResult, getResult, setConfiguration, setParameter
-
Methods inherited from class org.apache.ibatis.type.TypeReference
getRawType, toString
-
-
-
-
Constructor Detail
-
EnumTypeHandler
public EnumTypeHandler(java.lang.Class<E> type)
-
-
Method Detail
-
setNonNullParameter
public void setNonNullParameter(java.sql.PreparedStatement ps, int i, E parameter, JdbcType jdbcType) throws java.sql.SQLException
- Specified by:
setNonNullParameter
in classBaseTypeHandler<E extends java.lang.Enum<E>>
- Throws:
java.sql.SQLException
-
getNullableResult
public E getNullableResult(java.sql.ResultSet rs, java.lang.String columnName) throws java.sql.SQLException
- Specified by:
getNullableResult
in classBaseTypeHandler<E extends java.lang.Enum<E>>
columnName
- Colunm name, when configurationuseColumnLabel
isfalse
- Throws:
java.sql.SQLException
-
getNullableResult
public E getNullableResult(java.sql.ResultSet rs, int columnIndex) throws java.sql.SQLException
- Specified by:
getNullableResult
in classBaseTypeHandler<E extends java.lang.Enum<E>>
- Throws:
java.sql.SQLException
-
getNullableResult
public E getNullableResult(java.sql.CallableStatement cs, int columnIndex) throws java.sql.SQLException
- Specified by:
getNullableResult
in classBaseTypeHandler<E extends java.lang.Enum<E>>
- Throws:
java.sql.SQLException
-
-