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