public class LocalDateTimeTypeHandlerCustomizer
extends org.apache.ibatis.type.LocalDateTimeTypeHandler
Timestamp类型或LocalDateTime类型数据转换为 Java 8 LocalDateTime类型。
本类继承自LocalDateTimeTypeHandler,并重写了相关方法,以便能够处理从数据库中读取的ResultSet或CallableStatement中的LocalDateTime类型数据。
本类型处理器主要用于将数据库返回的Timestamp类型或LocalDateTime类型转换为 Java 8 的LocalDateTime类型。
注意:该类型处理器是可选的,只有在 MyBatis 映射的字段需要转换为LocalDateTime时才会使用。
LocalDateTimeTypeHandler| 构造器和说明 |
|---|
LocalDateTimeTypeHandlerCustomizer() |
| 限定符和类型 | 方法和说明 |
|---|---|
LocalDateTime |
getNullableResult(CallableStatement cs,
int columnIndex) |
LocalDateTime |
getNullableResult(ResultSet rs,
int columnIndex) |
LocalDateTime |
getNullableResult(ResultSet rs,
String columnName) |
public LocalDateTime getNullableResult(ResultSet rs, String columnName) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.LocalDateTimeTypeHandlerSQLExceptionpublic LocalDateTime getNullableResult(ResultSet rs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.LocalDateTimeTypeHandlerSQLExceptionpublic LocalDateTime getNullableResult(CallableStatement cs, int columnIndex) throws SQLException
getNullableResult 在类中 org.apache.ibatis.type.LocalDateTimeTypeHandlerSQLExceptionCopyright © 2025 Awesome Java Web. All rights reserved.