public class MybatisEnumTypeHandler<E extends Enum<E>>
extends org.apache.ibatis.type.BaseTypeHandler<E>
| 构造器和说明 |
|---|
MybatisEnumTypeHandler(Class<E> enumClassType) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
equalsValue(Object sourceValue,
Object targetValue)
值比较
|
static Optional<String> |
findEnumValueFieldName(Class<?> clazz)
查找标记标记EnumValue字段
|
E |
getNullableResult(CallableStatement cs,
int columnIndex) |
E |
getNullableResult(ResultSet rs,
int columnIndex) |
E |
getNullableResult(ResultSet rs,
String columnName) |
static boolean |
isMpEnums(Class<?> clazz)
判断是否为MP枚举处理
|
void |
setNonNullParameter(PreparedStatement ps,
int i,
E parameter,
org.apache.ibatis.type.JdbcType jdbcType) |
public static Optional<String> findEnumValueFieldName(Class<?> clazz)
clazz - classpublic static boolean isMpEnums(Class<?> clazz)
clazz - classpublic void setNonNullParameter(PreparedStatement ps, int i, E parameter, org.apache.ibatis.type.JdbcType jdbcType) throws SQLException
setNonNullParameter 在类中 org.apache.ibatis.type.BaseTypeHandler<E extends Enum<E>>SQLExceptionpublic E getNullableResult(ResultSet rs, String columnName) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<E extends Enum<E>>SQLExceptionpublic E getNullableResult(ResultSet rs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<E extends Enum<E>>SQLExceptionpublic E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.BaseTypeHandler<E extends Enum<E>>SQLExceptionCopyright © 2023. All rights reserved.